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:
authorWolfgang Scherer <wolfgang.scherer@gmx.de>2022-06-17 23:47:29 +0300
committerGiovanni Panozzo <giovanni@panozzo.it>2022-06-17 23:47:29 +0300
commit811aceb26d5f6e546f4b1ec09bb9150152f0410c (patch)
treecb09eb4d6b660abfaf80e4229baa2718fcc24fec /src
parent12550cbbc585968a1e525255f3d5af4f1ebf5852 (diff)
Fix #2473 - revive rcw_focus_out_event to avoid sticky Alt on Alt-TAB
Diffstat (limited to 'src')
-rw-r--r--src/rcw.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/rcw.c b/src/rcw.c
index 27eb3bad1..124d6ae60 100644
--- a/src/rcw.c
+++ b/src/rcw.c
@@ -3196,6 +3196,16 @@ static gboolean rcw_focus_in_event(GtkWidget *widget, GdkEventWindowState *event
return FALSE;
}
+static gboolean rcw_focus_out_event(GtkWidget *widget, GdkEventWindowState *event, gpointer user_data)
+{
+ TRACE_CALL(__func__);
+#if DEBUG_KB_GRABBING
+ printf("DEBUG_KB_GRABBING: RCW focus-out-event received\n");
+#endif
+ rcw_focus_out((RemminaConnectionWindow *)widget);
+ return FALSE;
+}
+
static gboolean rcw_state_event(GtkWidget *widget, GdkEventWindowState *event, gpointer user_data)
{
@@ -3341,6 +3351,8 @@ rcw_new(gboolean fullscreen, int full_screen_target_monitor)
/* Under wayland window-state-event is not received in some cases */
g_signal_connect(G_OBJECT(cnnwin), "focus-in-event", G_CALLBACK(rcw_focus_in_event), NULL);
+ /* Without focus-out-event, Alt-TAB makes Alt sticky */
+ g_signal_connect(G_OBJECT(cnnwin), "focus-out-event", G_CALLBACK(rcw_focus_out_event), NULL);
g_signal_connect(G_OBJECT(cnnwin), "enter-notify-event", G_CALLBACK(rcw_on_enter_notify_event), NULL);
g_signal_connect(G_OBJECT(cnnwin), "leave-notify-event", G_CALLBACK(rcw_on_leave_notify_event), NULL);