-
Bug
-
Resolution: Fixed
-
P3
-
6
-
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.
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.
- relates to
-
JDK-8158918 setExtendedState(1) for maximized Frame results in state==7
- Resolved
-
JDK-6573172 PIT: test/java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java fails
- Closed
-
JDK-4977483 WindowStateEvts not triggered properly on Sol when iconifying from maximized
- Closed