EVALUATION
Could not reproduce on Win2000 and WinXP with tiger. Seems that the test attached is not for this bug because when I run the test I haven't saw anything in console.
Maximizing Frame do not change the color of title bar too.
###@###.### 10/20/04 11:46 GMT
I have run the test and was able to reproduce the bug, but in another way. First, I couldn't maximize the frame because maximize button was disabled, and double-click on title bar did nothing. Second, when I minimize the frame and restore it again, it becomes active and pressing the button shows frame instance in the console.
After looking into AWT native code I've founded some lines related to the bug. In AwtWindow::ToFront() additional flag SWP_NOACTIVATE should be used while calling ::SetWindowPos for non-focusable frames. In AwtFrame::SetState() we use different modes SW_SHOWMAXIMIZED and SW_MAXIMIZE in ::ShowWindow() when maximizing the frame, but that constants are really equals according to winuser.h (SW_SHOWMAXIMIZED == SW_MAXIMIZE).
That were programmatic window state changes. As for user actions (for example, minimizing by using the button in taskbar), Windows automatically activate the window, so we must filter such attempts for non-focusable windows and don't pass the activation into Java. The best way to implement such filtering is using CBT hook procedure.
###@###.### 10/25/04 11:22 GMT
It's good to have such a hook. It will solve the problem of non-focusable windows completely.
I'm going to combine this fix with the fix for 6182359 that will correctly track non-focusable windows.
###@###.### 2004-12-03 13:43:41 GMT
|