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

[Glass, win32] Controls get refocused on window restore before they know their position (wrong Node.localToScreen(Point2D) behavior)

    Details

      Description

      I don't know whether this is a bug or a feature. But if it's a feature, it's pretty bad one.
      In my application, I display a Popup window with features complementing a TextField (imagine a bunch of Toggles denoting the field's content type). The popup visibility is bound to the text field's focus property so it stays on screen only when user needs it. It also keeps track of the field's position changes so it stays well positioned each time user moves the application window.
      Whenever the text field gains focus, the field's on-screen position is required in order to place the popup correctly. I use the field's Node.localToScreen(Point2D) method for this.

      If I have the field focused and minimize the application window, the field losts its focus and the popup closes.

      Now -- If I decide to restore the window again, the field regains its focus but its localToScreen() method returns negative numbers somewhere around -31000 which makes the popup reappear somewhere in the outer space.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jsmucrjfx Jan Smucr (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported: