[eog] Eogwindow: Only inhibit screensaver in slideshow mode



commit d8d4afed61665af200ed727d1bf32f217e76c8bd
Author: Felix Riemann <friemann gnome org>
Date:   Sat Aug 8 17:09:05 2020 +0200

    Eogwindow: Only inhibit screensaver in slideshow mode
    
    Inhibiting in simple fullscreen mode may be surprising for the casual
    user especially if collection or sidebar are visible. This aligns
    the inhibiting behaviour with Totem and Shotwell.
    
    Fixes #139.

 src/eog-window.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 9a3da25c9..a8b720deb 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -2034,8 +2034,10 @@ eog_window_run_fullscreen (EogWindow *window, gboolean slideshow)
                priv->mode = EOG_WINDOW_MODE_SLIDESHOW;
        } else {
                /* Stop the timer if we come from slideshowing */
-               if (priv->mode == EOG_WINDOW_MODE_SLIDESHOW)
+               if (priv->mode == EOG_WINDOW_MODE_SLIDESHOW) {
                        slideshow_clear_timeout (window);
+                       eog_window_uninhibit_screensaver (window);
+               }
 
                priv->mode = EOG_WINDOW_MODE_FULLSCREEN;
        }
@@ -2097,7 +2099,8 @@ eog_window_run_fullscreen (EogWindow *window, gboolean slideshow)
 
        gtk_window_fullscreen (GTK_WINDOW (window));
 
-       eog_window_inhibit_screensaver (window);
+       if (slideshow)
+               eog_window_inhibit_screensaver (window);
 
        /* Update both actions as we could've already been in one those modes */
        eog_window_update_slideshow_action (window);
@@ -2152,13 +2155,12 @@ eog_window_stop_fullscreen (EogWindow *window, gboolean slideshow)
 
        if (slideshow) {
                eog_window_update_slideshow_action (window);
+               eog_window_uninhibit_screensaver (window);
        } else {
                eog_window_update_fullscreen_action (window);
        }
 
        eog_scroll_view_show_cursor (EOG_SCROLL_VIEW (priv->view));
-
-       eog_window_uninhibit_screensaver (window);
 }
 
 static void


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