[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Don't overwrite the user's XScreensaver settings (Bug #14968)

noreply at xfce.org noreply at xfce.org
Thu Dec 13 21:39:03 CET 2018


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-power-manager.

commit 9fb776bc488f073e47f47cf69b632d1045221d08
Author: Teemu Ikonen <tpikonen at gmail.com>
Date:   Sat Nov 24 21:27:59 2018 +0200

    Don't overwrite the user's XScreensaver settings (Bug #14968)
    
    Do not change other X screensaver arguments (interval, prefer_blanking,
    allow_exposures) when changing blanking time.
    Get the current values from XGetScreenSaver() call and use them instead
    of defaults.
---
 src/xfpm-power.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/xfpm-power.c b/src/xfpm-power.c
index a1f6851..3552ba8 100644
--- a/src/xfpm-power.c
+++ b/src/xfpm-power.c
@@ -1431,6 +1431,7 @@ gboolean xfpm_power_has_battery (XfpmPower *power)
 static void
 xfpm_update_blank_time (XfpmPower *power)
 {
+    int prev_timeout, prev_interval, prev_prefer_blanking, prev_allow_exposures;
     Display* display = gdk_x11_display_get_xdisplay(gdk_display_get_default ());
     guint screensaver_timeout;
 
@@ -1445,7 +1446,8 @@ xfpm_update_blank_time (XfpmPower *power)
 
     XFPM_DEBUG ("Timeout: %d", screensaver_timeout);
 
-    XSetScreenSaver(display, screensaver_timeout * 60, 0, DefaultBlanking, DefaultExposures);
+    XGetScreenSaver(display, &prev_timeout, &prev_interval, &prev_prefer_blanking, &prev_allow_exposures);
+    XSetScreenSaver(display, screensaver_timeout * 60, prev_interval, prev_prefer_blanking, prev_allow_exposures);
 }
 
 static void

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list