Hi Sergey,

The probability of such scenario is very low but I agree it doesn't equal to zero.

Also, there is yet another scenario: right after the request to open candidate window is scheduled in the native queue the parent window is closed.

The updated fix: http://cr.openjdk.java.net/~ssadetsky/8179665/webrev.01/

--Semyon


On 05/10/2017 03:48 PM, Sergey Bylokhov wrote:
Hi, Semyon.
It seems that this new check is executed on a toolkit thread, and does not 
solve the problem if the window became invisible after this check but before we 
post an event to the EDT.
I guess that the root cause is that getTextLocation() throws an unexpected 
error but it should handle it and return empty rectangle(I guess it can be 
tested just by calling this method when the component is invisible). The 
current test and a check is also useful.

----- semyon.sadet...@oracle.com wrote:

Hello,

Please review fix for JDK10:

bug: https://bugs.openjdk.java.net/browse/JDK-8179665

webrev: http://cr.openjdk.java.net/~ssadetsky/8179665/webrev.00/

The root cause of the issue is IME events are sent when always-on-top

state is set or cleared even during the window is not visible. In this

case requesting the window position causes the exception.

The fix introduces a check for window visibility before the
calculation
of the IME status window position. The latter should not be shown when

the parent window is not visible so the IME window position is
unnecessary.

--Semyon

Reply via email to