mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
0096bb677a
With tiny changes from @vcunat.
31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
|
|
-- a/plugins/power/csd-power-manager.c
|
|
+++ b/plugins/power/csd-power-manager.c
|
|
@@ -33,6 +33,8 @@
|
|
#include <libnotify/notify.h>
|
|
#include <canberra-gtk.h>
|
|
|
|
+#include <X11/extensions/dpms.h>
|
|
+
|
|
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
|
#include <libcinnamon-desktop/gnome-rr.h>
|
|
|
|
@@ -3967,6 +3790,17 @@ csd_power_manager_start (CsdPowerManager
|
|
/* set the initial dim time that can adapt for the user */
|
|
refresh_idle_dim_settings (manager);
|
|
|
|
+ /* Make sure that Xorg's DPMS extension never gets in our way. The defaults seem to have changed in Xorg 1.14
|
|
+ * being "0" by default to being "600" by default
|
|
+ * https://bugzilla.gnome.org/show_bug.cgi?id=709114
|
|
+ */
|
|
+ gdk_error_trap_push ();
|
|
+ int dummy;
|
|
+ if (DPMSQueryExtension(GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &dummy, &dummy)) {
|
|
+ DPMSSetTimeouts (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), 0, 0, 0);
|
|
+ }
|
|
+ gdk_error_trap_pop_ignored ();
|
|
+
|
|
manager->priv->xscreensaver_watchdog_timer_id = g_timeout_add_seconds (XSCREENSAVER_WATCHDOG_TIMEOUT,
|
|
disable_builtin_screensaver,
|
|
NULL);
|