diff options
author | Giovanni Panozzo <giovanni@panozzo.it> | 2022-06-17 23:47:29 +0300 |
---|---|---|
committer | Giovanni Panozzo <giovanni@panozzo.it> | 2022-06-17 23:47:29 +0300 |
commit | 81ca0482052fe97c9fee901cb2e561b9b13d0d42 (patch) | |
tree | f37cf6b6d80aecc18e3d98cc88d59c8d25fc4752 | |
parent | ff11ac25413d8a900601e5a1b3b1aebdc8a972cb (diff) | |
parent | 811aceb26d5f6e546f4b1ec09bb9150152f0410c (diff) |
Merge branch 'revive-rcw_focus_out_event' into 'master'
Fix #2473 - revive rcw_focus_out_event to avoid sticky Alt on Alt-TAB
Closes #2204 and #2473
See merge request Remmina/Remmina!2413
-rw-r--r-- | src/rcw.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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); |