You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/profiles/templates/6_ac_install_patch/xfce-extra/xfce4-power-manager/screen_saver_timeout-1.2.patch

31 lines
911 B

# Calculate format=diff merge(xfce-extra/xfce4-power-manager)<1.5.2
diff --git src/xfpm-dpms.c src/xfpm-dpms.c
index 53f3721..6fb0947 100644
--- src/xfpm-dpms.c
+++ src/xfpm-dpms.c
@@ -46,6 +46,16 @@ static void xfpm_dpms_finalize (GObject *object);
#define XFPM_DPMS_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE((o), XFPM_TYPE_DPMS, XfpmDpmsPrivate))
+static void
+set_saver(Display *dpy, int value)
+{
+ int timeout, interval, prefer_blank, allow_exp;
+
+ XGetScreenSaver(dpy, &timeout, &interval, &prefer_blank, &allow_exp);
+ timeout = value;
+ XSetScreenSaver(dpy, timeout, timeout, prefer_blank, allow_exp);
+}
+
struct XfpmDpmsPrivate
{
XfpmXfconf *conf;
@@ -75,6 +85,7 @@ xfpm_dpms_set_timeouts (XfpmDpms *dpms, guint16 standby, guint16 suspend, guint
DPMSSetTimeouts (GDK_DISPLAY(), standby,
suspend,
off );
+ set_saver(GDK_DISPLAY(), standby);
}
}