<AWT Dev> [9] Request for review: JDK-8140525 AwtFrame::WmShowWindow() may steal focus

Anton Tarasov anton.tarasov at jetbrains.com
Wed Nov 23 14:23:47 UTC 2016

Hi Sergey,

On 11/23/2016 4:57 PM, Sergey Bylokhov wrote:
> Hi, Anton.
> On 23.11.16 13:08, Anton Tarasov wrote:
>> bug: https://bugs.openjdk.java.net/browse/JDK-8140525
>> webrev: http://cr.openjdk.java.net/~ant/JDK-8140525/webrev.0
>> Please find the description in the bug. This comment explains the fix:
> One question just to clarify the fix. Are there differences between 
> "::IsWindowVisible(GetHWnd()" vs "window->IsVisible()" for the fix, or 
> the first one was checked only?

It actually won't work, because m_visible is set ahead:

     m_visible = true;

The latter call causes WM_SHOWWINDOW and causes 
AwtFrame::WmShowWindow(BOOL show, UINT status).

So we have [window->isVisible() == true] whereas 
[::IsWindowVisible(hwnd) == false] at the moment.


More information about the awt-dev mailing list