diff options
author | Giovanni Panozzo <giovanni@panozzo.it> | 2022-11-06 22:32:37 +0300 |
---|---|---|
committer | Giovanni Panozzo <giovanni@panozzo.it> | 2022-11-06 22:32:37 +0300 |
commit | 5eed5fa360c25b15a49d22ca421cc4a4e5501ace (patch) | |
tree | 322d869b8449878fc6981083d2ed85f279066d02 | |
parent | 7226961afefa8f1530d881a6c50f4b1fbaaf2cf1 (diff) |
KB grabbing minor fixesgrab_fixes
-rw-r--r-- | src/rcw.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -492,6 +492,7 @@ static gboolean rcw_keyboard_grab_retry(gpointer user_data) static void rcw_pointer_ungrab(RemminaConnectionWindow *cnnwin) { + TRACE_CALL(__func__); #if GTK_CHECK_VERSION(3, 20, 0) GdkSeat *seat; GdkDisplay *display; @@ -507,6 +508,7 @@ static void rcw_pointer_ungrab(RemminaConnectionWindow *cnnwin) static void rcw_pointer_grab(RemminaConnectionWindow *cnnwin) { TRACE_CALL(__func__); + /* ToDo: according to https://gitlab.gnome.org/GNOME/mutter/-/issues/2450#note_1586817 we should not grab the pointer under Wayland */ #if GTK_CHECK_VERSION(3, 20, 0) GdkSeat *seat; GdkDisplay *display; @@ -2826,12 +2828,12 @@ static gboolean rcw_on_leave_notify_event(GtkWidget *widget, GdkEventCrossing *e } /* Workaround for https://gitlab.gnome.org/GNOME/mutter/-/issues/2450#note_1586570 */ - if (event->mode == GDK_CROSSING_GTK_UNGRAB) { + if (event->mode != GDK_CROSSING_UNGRAB) { rcw_kp_ungrab(cnnwin); rcw_pointer_ungrab(cnnwin); } else { #if DEBUG_KB_GRABBING - printf("DEBUG_KB_GRABBING: not ungrabbing, this event seems to be an unwanted event from GTK\n"); + printf("DEBUG_KB_GRABBING: not ungrabbing, this event seems to be an unwanted event from GTK under wayland when capturing the pointer.\n"); #endif } |