Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRDP/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiovanni Panozzo <giovanni@panozzo.it>2022-11-02 22:42:57 +0300
committerGiovanni Panozzo <giovanni@panozzo.it>2022-11-02 22:42:57 +0300
commit7226961afefa8f1530d881a6c50f4b1fbaaf2cf1 (patch)
tree2b5da8f74433c5d61234fc931ddb2128107326b6 /src
parentcb44df90ab2cfe54de008892440a84425de7a9eb (diff)
Avoid ungrab under some rcw leave event
Diffstat (limited to 'src')
-rw-r--r--src/rcw.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/rcw.c b/src/rcw.c
index ed08b66f0..c39dc5d8b 100644
--- a/src/rcw.c
+++ b/src/rcw.c
@@ -1312,11 +1312,6 @@ static void rcw_switch_viewmode(RemminaConnectionWindow *cnnwin, int newmode)
if (old_mode == newmode)
return;
-
-
- RemminaConnectionObject *cnnobj;
- cnnobj = rcw_get_visible_cnnobj(cnnwin);
-
if (newmode == VIEWPORT_FULLSCREEN_MODE || newmode == SCROLLED_FULLSCREEN_MODE) {
if (old_mode == SCROLLED_WINDOW_MODE) {
/* We are leaving SCROLLED_WINDOW_MODE, save W,H, and maximized
@@ -2830,8 +2825,15 @@ static gboolean rcw_on_leave_notify_event(GtkWidget *widget, GdkEventCrossing *e
cnnwin->priv->delayed_grab_eventsourceid = 0;
}
- rcw_kp_ungrab(cnnwin);
- rcw_pointer_ungrab(cnnwin);
+ /* Workaround for https://gitlab.gnome.org/GNOME/mutter/-/issues/2450#note_1586570 */
+ if (event->mode == GDK_CROSSING_GTK_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");
+#endif
+ }
return FALSE;
}