JDK-4977483 : WindowStateEvts not triggered properly on Sol when iconifying from maximized
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2004-01-13
  • Updated: 2007-06-04
  • Resolved: 2007-06-04
Related Reports
Relates :  
Description
I have added a WindowStateListener to a frame. I am setting the state of the frame to 'MAXIMIZED_BOTH' and the frame gets maximized. Then I am calling setExtendedState(Frame.ICONIFIED) and the frame gets iconified. When this is executed on WinXP, the sequence of window state events triggered is as follows:

======= From Listener - Win XP =======================
OLD state:  NORMAL
New state:  MAXIMIZED_BOTH MAXIMIZED_VERT MAXIMIZED_HORIZ

OLD state:  MAXIMIZED_BOTH MAXIMIZED_VERT MAXIMIZED_HORIZ
New state:  MAXIMIZED_BOTH MAXIMIZED_VERT MAXIMIZED_HORIZ ICONIFIED
==============================================

The same application on solaris triggers the following sequence of events:
======= From Listener - Solaris 9 (GNOME2.0) =======
OLD state:  NORMAL
New state:  MAXIMIZED_BOTH MAXIMIZED_VERT MAXIMIZED_HORIZ

OLD state:  MAXIMIZED_BOTH MAXIMIZED_VERT MAXIMIZED_HORIZ
New state:  ICONIFIED
==============================================

I feel the event sequence triggered by WinXP is correct. Actually when iconifying a frame which is in maximized state, the new State should typically be MAXIMIZED + ICONIFIED. But on Solaris, it shows as 'ICONIFIED'. 

Moreover, I tried executing this multiple times on Tiger as well as previous releases and the results seem to be inconsistant. I am surprised to get the same behavior as WinXP quite a few times on the previous releases (1.4) though i didn't get even once on Tiger - b32.

I have attached a sample testcase. Execute the sample testcase. If you get the results as mentioned above, then the bug is reproduced.

I tested this on Solaris Sparc 9 with GNOME2.0 desktop.

Comments
EVALUATION This is actually not a bug. If the developer wants a frame to become ICONIFIED, he/she need to call setExtendedState(Frame.ICONIFIED). However, if the developer wants the frame be in compound state, he/she need to explicitly invoke setExtendedState(Frame.ICONIFIED | Frame.MAXIMIZED_BOTH).
04-06-2007

EVALUATION Name: rpR10076 Date: 01/14/2004 We use the information that the Window Manager gives us to create the events, so if the event is create with that kind of state, probably it's what we got from the Window Manager. We need to investigate if we can provide better information. We'll do that for Dragon release. If it appears impossible to do that for some Window Managers, we might have to close it as will not fix. ###@###.### ====================================================================== Name: rpR10076 Date: 01/14/2004 After some more investigating we found out that probably Solaris behaviour is correct. If a user iconifies maximized window, it should be both maximized and iconified, but if the new state is set explicitly, it should be as it is set. So we shall fix Windows behaviour instead. ###@###.### ====================================================================== Need additional investigation and probably clarification in documentation ###@###.### 2005-06-23 11:55:21 GMT
23-06-2005

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
18-08-2004