patches/xscreensaver-11-dpms.diff
author yippi
Tue, 25 May 2010 22:54:51 +0000
changeset 18027 aecb9b8c6ef2
child 18039 93dd6ed68b16
permissions -rw-r--r--
2010-05-25 Brian Cameron <[email protected]> * specs/SUNWxscreensaver.spec: Bump to 5.11. * patches/xscreensaver-01-intltool.diff: Rename patch 41 to patch 01 since xscreensaver will not build without this patch, so apply it early. * patches/xscreensaver-01-datarotodir.diff, patches/xscreensaver-02-ldflags.diff, patches/xscreensaver-18-bug-6450019.diff, patches/xscreensaver-22-allowRootByPassFlag.diff, patches/xscreensaver-23-bug-6478841.diff, patches/xscreensaver-37-hush-misc.diff, patches/xscreensaver-40-interface-hack.diff, patches/xscreensaver-44-bug-6757448.diff, patches/xscreensaver-51-dpms-headers.diff, patches/xscreensaver-52-bug-6832923.diff, patches/xscreensaver-53-bug-6924996.diff: Remove, upstream. * patches/xscreensaver-12-debug-msgs.diff: Remove patch that just adds debug messages. * patches/xscreensaver-28-RobustKBGrab.diff, patches/xscreensaver-38-bug-6698996.diff: With testing, these two patches are no longer needed, so removed. * patches/xscreensaver-27-NULLRootPasswd.diff, patches/xscreensaver-42-bug-6769901.diff, patches/xscreensaver-45-bug-6825374.diff, patches/xscreensaver-46-bug-6857559.diff, patches/xscreensaver-48-bug-6839026.diff: Merged into patch xscreensaver-06-gtk-lock.diff. * patches/xscreensaver-15-accessibility.diff: Most of the code merged into patch xscreensaver-06-gtk-lock.diff except the pwd_p references which were merged into xscreensaver-08-passwdTimeout-pref.diff. * patches/xscreensaver-49-bug-6845488.diff, patches/xscreensaver-50-bug-6865652.diff: Merged into patch xscreensaver-13-trusted.diff. * patches/xscreensaver-26-bug-6520014.diff, patches/xscreensaver-43-bug-6736157.diff: Merged into patch xscreensaver-18-bug-6461887.diff.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18027
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     1
/*
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     2
 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     3
 *
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     4
 * Permission is hereby granted, free of charge, to any person obtaining a
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     5
 * copy of this software and associated documentation files (the
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     6
 * "Software"), to deal in the Software without restriction, including
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     7
 * without limitation the rights to use, copy, modify, merge, publish,
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     8
 * distribute, and/or sell copies of the Software, and to permit persons
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     9
 * to whom the Software is furnished to do so, provided that the above
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    10
 * copyright notice(s) and this permission notice appear in all copies of
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    11
 * the Software and that both the above copyright notice(s) and this
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    12
 * permission notice appear in supporting documentation.
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    13
 *
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    15
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    16
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    17
 * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    18
 * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    19
 * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    20
 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    21
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    22
 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    23
 *
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    24
 * Except as contained in this notice, the name of a copyright holder
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    25
 * shall not be used in advertising or otherwise to promote the sale, use
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    26
 * or other dealings in this Software without prior written authorization
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    27
 * of the copyright holder.
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    28
 *
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    29
 */
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    30
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    31
Allow xset dpms settings to override .xscreensaver.
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    32
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    33
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    34
diff -Nurp -x '*~' -x '*.orig' xscreensaver-5.11/driver/timers.c xscreensaver-5.11/driver/timers.c
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    35
--- xscreensaver-5.11/driver/timers.c	2009-05-27 17:19:00.463193000 -0700
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    36
+++ xscreensaver-5.11/driver/timers.c	2009-05-27 17:19:17.662370000 -0700
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    37
@@ -1499,6 +1499,8 @@ watchdog_timer (XtPointer closure, XtInt
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    38
 
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    39
   /* If the DPMS settings on the server have changed, change them back to
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    40
      what ~/.xscreensaver says they should be. */
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    41
+  /* mali- No!! if someone uses xset then let the changes be picked by
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    42
+   * xscreensaver...do not have to regulate everything from .xscreensaver.
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    43
   sync_server_dpms_settings (si->dpy,
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    44
                              (p->dpms_enabled_p  &&
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    45
                               p->mode != DONT_BLANK),
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    46
@@ -1506,6 +1508,7 @@ watchdog_timer (XtPointer closure, XtInt
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    47
                              p->dpms_suspend / 1000,
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    48
                              p->dpms_off / 1000,
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    49
                              False);
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    50
+  **/
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    51
 
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    52
   if (si->screen_blanked_p)
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    53
     {
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    54
diff -Nurp -x '*~' -x '*.orig' xscreensaver-5.11/driver/xscreensaver.c xscreensaver-5.11/driver/xscreensaver.c
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    55
--- xscreensaver-5.11/driver/xscreensaver.c	2009-05-27 17:19:00.469448000 -0700
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    56
+++ xscreensaver-5.11/driver/xscreensaver.c	2009-05-27 17:19:17.663626000 -0700
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    57
@@ -1528,6 +1528,10 @@ main (int argc, char **argv)
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    58
   init_sigchld ();
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    59
 
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    60
   disable_builtin_screensaver (si, True);
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    61
+/*****
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    62
+  mali- this may need to be taken out in future if it hinders user
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    63
+  setting dpms values through xset.
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    64
+ *****/
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    65
   sync_server_dpms_settings (si->dpy,
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    66
                              (p->dpms_enabled_p  &&
aecb9b8c6ef2 2010-05-25 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    67
                               p->mode != DONT_BLANK),