JDK-6581927 : REG : Non focusable frame can be minimized to very small & Frame icon can be seen on frame buttons.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-07-18
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b25Fixed
Related Reports
Relates :  
Description
I have a non focusable frame, when i resize the frame i can see that frame icon goes over the minimize , maximize & close button. I can resize the frame to very small & infact we can make the frame to invisible on the frame by resizing. 

The same behaviour can be seen from 1.4.2 onwards till jdk1.6.0 b40 ( the build i had ). But some how the problem is not seen jdk1.6.0 b48 ( the build i had) to jdk1.7.0 b01, But the problem is seen from jdk1.7.0 b02 onwards. Hence this is a regression from jdk1.6 to jdk1.7 . The bug is not reproducable even jdk1.6.0 update releases , not only that http://monaco.sfbay/detail.jsf?cr=4980161 is also not seen. but the  http://monaco.sfbay/detail.jsf?cr=4980161 is once again seen from jdk1.7.0 b02 onwards. But it got fixed in jdk1.7.0_b17 pit build.

The bug is reproduce only when the frame is non-focusable. 

Step to reproduce:
------------------
1) Run the attached testcase.
	java WindowStateTest <0/1>
	0 - set focusable window state to true
	1 - set focusable window state to false

Pass "1" as the argument. 
2)A frame will be shown. 
3) Click on the maximize button , so that the frame is maximized.
4) Move the mouse to the right buttom of the frame & try resizing the frame. 
Observe that frame icon (java cup) is seen on the frame buttons & resizing it to further the frame is not seen on the screen. If you see the same then the bug is reproduced.

Comments
SUGGESTED FIX diff -r 37a05a11f281 src/windows/native/sun/windows/awt_Frame.cpp --- a/src/windows/native/sun/windows/awt_Frame.cpp Sat Dec 01 00:00:00 2007 +0000 +++ b/src/windows/native/sun/windows/awt_Frame.cpp Wed Dec 19 16:48:41 2007 +0300 @@ -495,7 +495,7 @@ MsgRouting AwtFrame::WmMouseMove(UINT fl ::SetWindowPos(GetHWnd(), NULL, r.left, r.top, r.right-r.left, r.bottom-r.top, - SWP_NOACTIVATE | SWP_NOSENDCHANGING | SWP_NOZORDER | + SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOCOPYBITS | SWP_DEFERERASE); } return mrConsume;
19-12-2007

EVALUATION Removing the SWP_NOSENDCHANGING flag when invoking the ::SetWindowPos() Win32API function at AwtFrame::WmMouseMove() function seems to help. While this flag is set, Windows seems to not constrain the size of the window at all.
12-12-2007

EVALUATION The strange thing is that I'm able to reproduce this bug with 6.0-b46 and at the same time see no fixes in 6.0-b47/48 that could affect the problem. In 7.0-b02 the "suspicious" fixes are 6355340 and 6399659, probably one of them caused the bug to reappear again.
18-07-2007