RFR: 8320965: Scrolling on a touch enabled display fails on Wayland [v3]
Jose Pereda
jpereda at openjdk.org
Mon Feb 19 13:37:59 UTC 2024
On Mon, 18 Dec 2023 11:19:18 GMT, Jose Pereda <jpereda at 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
I see... so removing all the changes from this PR, and using this diff from head instead:
diff --git a/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp b/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp
index e7a230b2b6..e89db2a55f 100644
--- a/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp
+++ b/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp
@@ -605,7 +605,8 @@ glass_gdk_mouse_devices_grab_with_cursor(GdkWindow *gdkWindow, GdkCursor *cursor
| GDK_BUTTON2_MOTION_MASK
| GDK_BUTTON3_MOTION_MASK
| GDK_BUTTON_PRESS_MASK
- | GDK_BUTTON_RELEASE_MASK),
+ | GDK_BUTTON_RELEASE_MASK
+ | GDK_TOUCH_MASK),
NULL, cursor, GDK_CURRENT_TIME);
return (status == GDK_GRAB_SUCCESS) ? TRUE : FALSE;
it looks like dragging works on a touch enabled display and Wayland. (No changes needed in `GDK_FILTERED_EVENTS_MASK`).
Tested this change on X11 as well, I don't see any issue.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1305#issuecomment-1952469103
More information about the openjfx-dev
mailing list