On Mon, 18 Dec 2023 11:19:18 GMT, Jose Pereda <jper...@openjdk.org> wrote:

>> This PR replaces the deprecated `gdk_pointer_grab` with `gdk_seat_grab`, and 
>> `gdk_pointer_ungrab ` with `gdk_seat_ungrab`, using runtime checks and 
>> wrapped functions for GTK 3.20+ (so systems without it still run with GTK 
>> 3.8+), and fixes the dragging issue on Wayland.
>
> Jose Pereda has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Add compile-time checks to GdkSeat

Yes, for some reason, after applying the changes from this PR, there are Leave 
events.

When it works:

loaded gdk_seat_grab
loaded gdk_display_get_default_seat
GlassApplication::process_events: GDK_ENTER_NOTIFY
found schema 'org.gnome.desktop.interface' and key 'scaling-factor'
GlassApplication::process_events: GDK_ENTER_NOTIFY
GlassApplication::process_events: GDK_MOTION_NOTIFY
GlassApplication::process_events: GDK_BUTTON_PRESS
GlassApplication::process_mouse_button: pressed
GlassApplication::process_events: GDK_BUTTON_RELEASE
GlassApplication::process_mouse_button: not pressed
...

When it fails:

loaded gdk_seat_grab
loaded gdk_display_get_default_seat
GlassApplication::process_events: GDK_LEAVE_NOTIFY
GlassApplication::process_events: GDK_ENTER_NOTIFY
GlassApplication::process_events: GDK_LEAVE_NOTIFY
GlassApplication::process_events: GDK_ENTER_NOTIFY
found schema 'org.gnome.desktop.interface' and key 'scaling-factor'
GlassApplication::process_events: GDK_LEAVE_NOTIFY
GlassApplication::process_events: GDK_MOTION_NOTIFY
GlassApplication::process_events: GDK_BUTTON_PRESS
GlassApplication::process_mouse_button: pressed
Java_com_sun_glass_ui_gtk_GtkWindow__1ungrabFocus()
ungrab focus()
...

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1305#issuecomment-1906355019

Reply via email to