Hi,
I'm not an expert in X11 programming, so I can't comment about the fix in general, but I think the line 2436, "return getEventNumber() - event_number > 3", really asks for a comment.

On 9/25/2013 16:38, Oleg Pekhovskiy wrote:
Hi all,

please review the fix
http://cr.openjdk.java.net/~bagiras/7033533.1/
for
https://bugs.openjdk.java.net/browse/JDK-7033533

Previous implementation of XToolkit.syncNativeQueue() relied upon WM_S0 atom existence and that it was owned by current window manager. But several WMs (like XFCE and LXDE) don't send SelectionNotify event to the client on XConvertSelection() for that atom. That led XToolkit.syncNativeQueue() to hang until TimeOutException.

I decided to keep XConvertSelection() usage, but make root toolkit window as an owner for selection atom (with another name), and handle SelectionRequest event from X Server, sending SelectionNotify in response (as window manager is supposed to do).

Tested on both XFCE and LXDE.

Thanks,
Oleg

Reply via email to