]> www.fi.muni.cz Git - evince.git/commitdiff
Hide fullscreen toolbar when switching to another desktop workspace. Fixes
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 22 Oct 2006 15:32:50 +0000 (15:32 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 22 Oct 2006 15:32:50 +0000 (15:32 +0000)
2006-10-22  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-window.c: (fullscreen_timeout_cb), (ev_window_init):
Hide fullscreen toolbar when switching to another desktop workspace.
Fixes bug #338871

ChangeLog
shell/ev-window.c

index 84279630910247edaca973023a3123bb947559b5..09622b6c82bf7d2afb5898650238cdb55db476af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-10-22  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-window.c: (fullscreen_timeout_cb), (ev_window_init):
+
+       Hide fullscreen toolbar when switching to another desktop workspace.
+       Fixes bug #338871
+
 2006-10-20  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * shell/ev-window-title.c: 
index 868a56ea0af93ffa4c0d4ce7af4b16cdd6f8348e..aea1c1bd0e3c2eccafcd125ef907275a4cf7561b 100644 (file)
@@ -2089,9 +2089,12 @@ fullscreen_popup_size_request_cb (GtkWidget *popup, GtkRequisition *req, EvWindo
 }
 
 static gboolean
-fullscreen_timeout_cb (gpointer data)
+fullscreen_timeout_cb (EvWindow *window)
 {
-       EvWindow *window = EV_WINDOW (data);
+       EvView *view = EV_VIEW (window->priv->view);
+
+       if (!view || !ev_view_get_fullscreen (EV_VIEW (view)))
+               return FALSE;
        
        update_chrome_flag (window, EV_CHROME_FULLSCREEN_TOOLBAR, FALSE);
        ev_view_hide_cursor (EV_VIEW (window->priv->view));
@@ -2108,7 +2111,7 @@ fullscreen_set_timeout (EvWindow *window)
        }
        
        window->priv->fullscreen_timeout_id = 
-           g_timeout_add (FULLSCREEN_TIMEOUT, fullscreen_timeout_cb, window);
+           g_timeout_add (FULLSCREEN_TIMEOUT, (GSourceFunc)fullscreen_timeout_cb, window);
 
        update_chrome_flag (window, EV_CHROME_FULLSCREEN_TOOLBAR, TRUE);
        update_chrome_visibility (window);
@@ -4102,6 +4105,8 @@ ev_window_init (EvWindow *ev_window)
                          G_CALLBACK (window_configure_event_cb), NULL);
        g_signal_connect (ev_window, "window_state_event",
                          G_CALLBACK (window_state_event_cb), NULL);
+       g_signal_connect (ev_window, "notify",
+                         G_CALLBACK (fullscreen_timeout_cb), NULL);
 
        ev_window->priv = EV_WINDOW_GET_PRIVATE (ev_window);