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

Window state changes without notifying the listener on Win32

XMLWordPrintable

    • b15
    • x86
    • windows_xp
    • Verified

      I have written an application which sets the states for the frame in the following order, after checking whether they are supported.

      Frame.MAXIMIZED_BOTH
      Frame.ICONIFIED
      Frame.NORMAL

      This results in a set of window events being triggered and the sequence of events triggered on Win XP is as follows:
      ======= From Listener =======================
      1.OLD state: NORMAL
      2.New state: MAXIMIZED_BOTH MAXIMIZED_VERT MAXIMIZED_HORIZ

      3.OLD state: MAXIMIZED_BOTH MAXIMIZED_VERT MAXIMIZED_HORIZ
      4.New state: MAXIMIZED_BOTH MAXIMIZED_VERT MAXIMIZED_HORIZ ICONIFIED

      5.OLD state: ICONIFIED
      6.New state: NORMAL
      ==============================================

      When I looked at event 4,5, I am surprised to see the state being changed from MAXIMIZED_BOTH + ICONIFIED to just ICONIFIED without notifying the listener. The application has not initiated any state change that would change the state 4 to state 5. I expect the new state of the previous event and the old state of the current event to be same which is not happening in case of WinXP. On Solaris, both state 4,5 are ICONIFIED.

      This is noticed right from JDK1.4.

      I have attached a sample testcase. Execute the sample testcase. If you notice the above behavior, the bug is reproduced.

            anthony Anthony Petrov (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: