<AWT Dev> <Awt Dev> [9] Review Request for 8025815: Child FileDialog of modal dialog does not get focus on Gnome

Alexander Zvegintsev alexander.zvegintsev at oracle.com
Wed Jul 15 13:23:16 UTC 2015


still looks good to me.

Thanks,

Alexander.

On 07/15/2015 03:59 PM, Semyon Sadetsky wrote:
> Hi Alexander,
>
> In the next version I have updated the test and Sergey's notes are 
> taken into account.
>
> http://cr.openjdk.java.net/~ssadetsky/8025815/webrev.01/
>
> --Semyon
>
> On 7/13/2015 7:21 PM, Alexander Zvegintsev wrote:
>> Hello Semyon,
>>
>> the fix itself look good to me, but the test seems to be broken, it 
>> passes for me before the fix and fails after( Ubuntu 14.04, Unity)
>>
>> Thanks,
>>
>> Alexander.
>>
>> On 07/13/2015 04:59 PM, Semyon Sadetsky wrote:
>>> Hello,
>>>
>>> Please review fix for JDK9:
>>>
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8025815
>>> wbrev: http://cr.openjdk.java.net/~ssadetsky/8025815/webrev.00/
>>>
>>> The root cause is a mixing of GTK and XLib windows. Normally Java 
>>> uses XLib windows and manage focus transitivity on its side. But for 
>>> the file chooser we use a native GTK widget if it is available and 
>>> this widget is crated without parent window because we don't have 
>>> any other GTK windows. This breaks the focus transitivity chain on 
>>> Java side because focus is managed by the WM for GTK dialog. Without 
>>> parent window the GTK file dialog is managed by the WM as a detached 
>>> standalone window. So modality and focus transitivity with Java 
>>> windows do not work correctly: the dialog can be overlapped by other 
>>> java windows and focus can be transferred to them.
>>> The proposed solution obtains XID of the GTK dialog window and pass 
>>> it to the java side to take into account in the focus transitivity 
>>> chain by sending messages to the WM.
>>>
>>> Yet another issue I found in the GTK file chooser code is a dispose 
>>> concurrency issue. The GTK dialog widget is being created in a 
>>> separate thread upon the setVisible(true) call but it can be hidden 
>>> or disposed without any synchronization with this thread. It can 
>>> prevent the VM from stopping if the dialog is hidden or disposed 
>>> right after its creation. This also was fixed in the proposed solution.
>>>
>>> --Semyon
>>
>



More information about the awt-dev mailing list