ftp://ftp.demon.nl/disk1/redhat-contrib/libc5/SRPMS/xscreensaver-2.14-1.src.rpm
[xscreensaver] / driver / xset.c
index cd2aa38c2a8b07d12fae2e41b7f8a95efde3f709..c4fb6d6b150ca90ce05cf774d671e2fec05b35cd 100644 (file)
@@ -157,12 +157,32 @@ disable_builtin_screensaver (saver_info *si, Bool turn_off_p)
 
   /* On SGIs, if interval is non-zero, it is the number of seconds after
      screen saving starts at which the monitor should be powered down.
-     Obviously I don't want that, so make sure it's 0.
+     Obviously I don't want that, so make sure it's a large positive number.
 
      Power saving is disabled if DontPreferBlanking, but in that case,
      we don't get extension events either.  So we can't turn it off that way.
+
+     The man page for `XSetScreenSaver' says that setting interval to 0 will
+     disable powering down of the monitor, but this turns out not to be the
+     case on Irix 6.3 (O2); the monitor powers down anyway.  It didn't do
+     this on 6.2, so someone screwed up.
+
+     Extra Sucky Factoid #2: the number can't be more than 15 bits, which
+     is only a bit over nine hours.  So there's just *no fucking way* to make
+     an SGI O2 leave its monitor powered on and idle for more than nine hours.
+     You fucking losers!
+
+     [...Later...]  Ok, it's worse than that.  The above doesn't work either.
+     Setting it to a small number will cause it to power down early; but even
+     if you set it to a large number, it still seems to power down in about
+     an hour.  You fucking fucking fucking losers!
    */
-  desired_server_interval = 0;
+#ifdef HAVE_SGI_SAVER_EXTENSION
+  if (p->use_sgi_saver_extension)
+    desired_server_interval = 32767;
+  else
+#endif
+    desired_server_interval = 0;
 
   /* I suspect (but am not sure) that DontAllowExposures might have
      something to do with powering off the monitor as well. */