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

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Jul 14 10:19:42 UTC 2015

Small comment:
GtkFileDialogPeer.c: you will need to add a CHECK_NULL( widgetFieldID) 
before setWindowMethodID, and CHECK_NULL(setWindowMethodID); at the end 
of the method is not necessary.

On 13.07.15 16:59, 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

Best regards, Sergey.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20150714/950a58b9/attachment.html>

More information about the awt-dev mailing list