summarylogtreecommitdiffstats
path: root/disable_watchdog.patch
blob: 98f5e0fd9bfab4b23f20d58b5da2f4c8344a4037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
diff --git a/src/gs-watcher-x11.c b/src/gs-watcher-x11.c
index f0b0d83..407b4f6 100644
--- a/src/gs-watcher-x11.c
+++ b/src/gs-watcher-x11.c
@@ -491,8 +491,6 @@ gs_watcher_init (GSWatcher *watcher)
 
         /* time before idle signal to send notice signal */
         watcher->priv->delta_notice_timeout = 10000;
-
-        add_watchdog_timer (watcher, 600000);
 }
 
 static void
@@ -524,90 +522,9 @@ gs_watcher_finalize (GObject *object)
         G_OBJECT_CLASS (gs_watcher_parent_class)->finalize (object);
 }
 
-/* Figuring out what the appropriate XSetScreenSaver() parameters are
-   (one wouldn't expect this to be rocket science.)
-*/
-static void
-disable_builtin_screensaver (GSWatcher *watcher,
-                             gboolean   unblank_screen)
-{
-        int current_server_timeout, current_server_interval;
-        int current_prefer_blank,   current_allow_exp;
-        int desired_server_timeout, desired_server_interval;
-        int desired_prefer_blank,   desired_allow_exp;
-
-        XGetScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
-                         &current_server_timeout,
-                         &current_server_interval,
-                         &current_prefer_blank,
-                         &current_allow_exp);
-
-        desired_server_timeout  = current_server_timeout;
-        desired_server_interval = current_server_interval;
-        desired_prefer_blank    = current_prefer_blank;
-        desired_allow_exp       = current_allow_exp;
-
-        desired_server_interval = 0;
-
-        /* I suspect (but am not sure) that DontAllowExposures might have
-           something to do with powering off the monitor as well, at least
-           on some systems that don't support XDPMS?  Who know... */
-        desired_allow_exp = AllowExposures;
-
-        /* When we're not using an extension, set the server-side timeout to 0,
-           so that the server never gets involved with screen blanking, and we
-           do it all ourselves.  (However, when we *are* using an extension,
-           we tell the server when to notify us, and rather than blanking the
-           screen, the server will send us an X event telling us to blank.)
-        */
-        desired_server_timeout = 0;
-
-        if (desired_server_timeout     != current_server_timeout
-            || desired_server_interval != current_server_interval
-            || desired_prefer_blank    != current_prefer_blank
-            || desired_allow_exp       != current_allow_exp) {
-
-                gs_debug ("disabling server builtin screensaver:"
-                          " (xset s %d %d; xset s %s; xset s %s)",
-                          desired_server_timeout,
-                          desired_server_interval,
-                          (desired_prefer_blank ? "blank" : "noblank"),
-                          (desired_allow_exp ? "expose" : "noexpose"));
-
-                XSetScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
-                                 desired_server_timeout,
-                                 desired_server_interval,
-                                 desired_prefer_blank,
-                                 desired_allow_exp);
-
-                XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
-        }
-
-        if (unblank_screen) {
-                /* Turn off the server builtin saver if it is now running. */
-                XForceScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ScreenSaverReset);
-        }
-}
-
-
-/* This timer goes off every few minutes, whether the user is idle or not,
-   to try and clean up anything that has gone wrong.
-
-   It calls disable_builtin_screensaver() so that if xset has been used,
-   or some other program (like xlock) has messed with the XSetScreenSaver()
-   settings, they will be set back to sensible values (if a server extension
-   is in use, messing with xlock can cause the screensaver to never get a wakeup
-   event, and could cause monitor power-saving to occur, and all manner of
-   heinousness.)
-
- */
-
 static gboolean
 watchdog_timer (GSWatcher *watcher)
 {
-
-        disable_builtin_screensaver (watcher, FALSE);
-
         return TRUE;
 }
 
-- 
2.31.1