From: Carlos Garcia Campos Date: Sun, 22 Oct 2006 15:32:50 +0000 (+0000) Subject: Hide fullscreen toolbar when switching to another desktop workspace. Fixes X-Git-Tag: EVINCE_0_7_0~95 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=141b0877eea395345987f2b8d9269376b76e4204;p=evince.git Hide fullscreen toolbar when switching to another desktop workspace. Fixes 2006-10-22 Carlos Garcia Campos * shell/ev-window.c: (fullscreen_timeout_cb), (ev_window_init): Hide fullscreen toolbar when switching to another desktop workspace. Fixes bug #338871 --- diff --git a/ChangeLog b/ChangeLog index 84279630..09622b6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-10-22 Carlos Garcia Campos + + * 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 * shell/ev-window-title.c: diff --git a/shell/ev-window.c b/shell/ev-window.c index 868a56ea..aea1c1bd 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -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);