diff options
author | Giovanni Panozzo <giovanni@panozzo.it> | 2022-11-09 20:41:59 +0300 |
---|---|---|
committer | Giovanni Panozzo <giovanni@panozzo.it> | 2022-11-09 20:41:59 +0300 |
commit | 090235e4b6a473d261a7d8b964a8e71e10bc9405 (patch) | |
tree | 307a8461f2b4b4366ce89ae3a61e4710586661b0 /src/rcw.c | |
parent | d42ebee509d973191b0e541ad2a9f0532be885ba (diff) | |
parent | 6f52ca0db41af9cfb10656af9d4f9b03d94c24c0 (diff) |
Merge branch 'ftb_fixes' into 'master'
Fix floating toolbar not disappearing when in fullscreen and keyboard grabbed
Closes #2710
See merge request Remmina/Remmina!2441
Diffstat (limited to 'src/rcw.c')
-rw-r--r-- | src/rcw.c | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -2758,14 +2758,6 @@ static void rcw_set_toolbar_visibility(RemminaConnectionWindow *cnnwin) } } -static gboolean rcw_floating_toolbar_on_enter(GtkWidget *widget, GdkEventCrossing *event, - RemminaConnectionWindow *cnnwin) -{ - TRACE_CALL(__func__); - rcw_floating_toolbar_show(cnnwin, TRUE); - return TRUE; -} - #if DEBUG_KB_GRABBING static void print_crossing_event(GdkEventCrossing *event) { printf("DEBUG_KB_GRABBING: --- Crossing event detail: "); @@ -2796,6 +2788,24 @@ static void print_crossing_event(GdkEventCrossing *event) { } #endif +static gboolean rcw_floating_toolbar_on_enter(GtkWidget *widget, GdkEventCrossing *event, + RemminaConnectionWindow *cnnwin) +{ + TRACE_CALL(__func__); + rcw_floating_toolbar_show(cnnwin, TRUE); + return TRUE; +} + +static gboolean rcw_floating_toolbar_on_leave(GtkWidget *widget, GdkEventCrossing *event, + RemminaConnectionWindow *cnnwin) +{ + TRACE_CALL(__func__); + if (event->detail != GDK_NOTIFY_INFERIOR) + rcw_floating_toolbar_show(cnnwin, FALSE); + return TRUE; +} + + static gboolean rcw_on_enter_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) { @@ -3890,6 +3900,7 @@ static void rcw_create_overlay_ftb_overlay(RemminaConnectionWindow *cnnwin) rcw_floating_toolbar_show(cnnwin, TRUE); g_signal_connect(G_OBJECT(priv->overlay_ftb_overlay), "enter-notify-event", G_CALLBACK(rcw_floating_toolbar_on_enter), cnnwin); + g_signal_connect(G_OBJECT(priv->overlay_ftb_overlay), "leave-notify-event", G_CALLBACK(rcw_floating_toolbar_on_leave), cnnwin); g_signal_connect(G_OBJECT(priv->overlay_ftb_overlay), "scroll-event", G_CALLBACK(rcw_floating_toolbar_on_scroll), cnnwin); gtk_widget_add_events( GTK_WIDGET(priv->overlay_ftb_overlay), |