[evince] shell: prevent multiple fullscreen toolbar timeouts



commit 244b06d8bb6b3e944c324090685eaf493f2d94f0
Author: Jason Crain <jcrain src gnome org>
Date:   Sun Apr 21 16:34:20 2019 -0600

    shell: prevent multiple fullscreen toolbar timeouts
    
    Gtk is generating a 'leave-notify-event' whenever the fullscreen toolbar
    is clicked without a matching 'enter-notify-event', and we create a new
    timeout each time. When we exit fullscreen mode, we only clear the last
    timeout, so we can end up with a timeout on a null toolbar, leading to a
    crash.
    
    Fix this by clearing any existing timeouts before creating a new one.
    
    Fixes #787

 shell/ev-window.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 9d13d9ab..b804dee7 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -4431,6 +4431,7 @@ ev_window_add_fullscreen_timeout (EvWindow *window)
 {
        EvWindowPrivate *priv = GET_PRIVATE (window);
 
+       ev_window_remove_fullscreen_timeout (window);
        priv->fs_timeout_id =
                g_timeout_add_seconds (FULLSCREEN_POPUP_TIMEOUT,
                                       (GSourceFunc)fullscreen_toolbar_timeout_cb, window);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]