Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4117036

MOUSE EVENTS SENT TO HIDDEN COMPONENTS

XMLWordPrintable

    • 1.1.6
    • x86
    • windows_nt
    • Not verified



      Name: clC74495 Date: 03/04/98


      This bug report is from Oracle, a Java licensee.
      We would like to have the following bug
      addressed in JDK 1.1.6.
      The Oracle bug number is 635654.

      The bug is within JavaSoft's fix for a previously
      filed bug, Oracle bug 507960 / JavaSoft bug 4040388.
      This older bug was regarding a problem with
      Frame.setCursor(), where calling the method would
      not change the cursor until the mouse was moved.
      Oracle suggested a simple fix, but JavaSoft
      fixed it in a different manner, using a
      mouse move message. Oracle verified that JavaSoft's
      fix (in awt_Component.cpp, introduced in
      JDK 1.1.6B) did fix the bug.

      That fix for Oracle bug 507960, however, has now
      been proven to cause events to be sent to the wrong
      windows, because it calls WindowFromPoint().

      Replacing Javasoft's fix with Oracle's original
      suggested fix resolves both issues (507960 and
      635654).
      Our original fix is simply to call SetCursorPos,
      immediately after calling GetCursorPos,
      so the end of sun_awt_windows_WComponentPeer_setCursor()
      (in awt_Component.cpp) becomes:

      ...
          POINT pt;
          ::GetCursorPos(&pt);
          ::SetCursorPos(pt.x, pt.y);
      }
      (Review ID: 25952)
      ======================================================================

            rkhansunw Robi Khan (Inactive)
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: