Alexander Pyhalov
2017-07-25 bb324ae643f765d84860edd5024f95b7fb4e7c79
xscreensaver: remove dependencies on Gnome 2 libraries
12 files deleted
1 files added
8 files modified
125036 ■■■■■ changed files
components/desktop/xscreensaver/Makefile 32 ●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/de.po 9913 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/es.po 9917 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/fr.po 9416 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/it.po 9843 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/ja.po 9918 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/ko.po 9813 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/pl.po 9833 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/pt_BR.po 9785 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/ru.po 9843 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/sv.po 9830 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/zh_CN.po 9799 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/files/po-sun/zh_TW.po 9796 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/manifests/sample-manifest.p5m 4 ●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/patches/0000-Port-from-libglade-to-GtkBuilder.patch 6402 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/patches/xscreensaver-04-solaris-paths.patch 156 ●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/patches/xscreensaver-06-gtk-lock.patch 229 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/patches/xscreensaver-07-allow-root.patch 136 ●●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/patches/xscreensaver-08-passwdTimeout-pref.patch 347 ●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/patches/xscreensaver-26-keyboard-indicator.patch 22 ●●●● patch | view | raw | blame | history
components/desktop/xscreensaver/xscreensaver.p5m 2 ●●● patch | view | raw | blame | history
components/desktop/xscreensaver/Makefile
@@ -18,7 +18,7 @@
COMPONENT_NAME=        xscreensaver
COMPONENT_VERSION=    5.35
COMPONENT_REVISION=    2
COMPONENT_REVISION=    3
COMPONENT_PROJECT_URL=    http://www.jwz.org/xscreensaver/
COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
@@ -32,19 +32,18 @@
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk
COMPONENT_POST_UNPACK_ACTION=    ( cp -r $(COMPONENT_DIR)/files/po-sun/* $(SOURCE_DIR)/po && \
                    cp $(COMPONENT_DIR)/files/*.p5i.in $(SOURCE_DIR)/driver && \
COMPONENT_POST_UNPACK_ACTION=    ( cp $(COMPONENT_DIR)/files/*.p5i.in $(SOURCE_DIR)/driver && \
                    chmod a+x  $(SOURCE_DIR)/install-sh && \
                    mkdir -p $(SOURCE_DIR)/mesa/GL && \
                    ln -s /usr/include/mesa/*.h $(SOURCE_DIR)/mesa/GL )
COMPONENT_PREP_ACTION = ( cd $(@D) && autoreconf -if )
COMPONENT_PRE_CONFIGURE_ACTION += chmod -R u+r $(SOURCE_DIR)/ && \
            cp -r $(SOURCE_DIR)/* $(@D) && \
                        cd $(@D) && autoconf
PATH=$(PATH.gnu)
PATH = $(PATH.gnu)
COMPONENT_PRE_CONFIGURE_ACTION += chmod -R u+r $(SOURCE_DIR)/ && \
                    cp -rpP $(SOURCE_DIR)/* $(@D)
CONFIGURE_SCRIPT=    $(@D)/configure
@@ -53,20 +52,12 @@
LDFLAGS+=    -I$(@D)/mesa/GL 
CONFIGURE_ENV+=    "XGETTEXT=/usr/gnu/bin/xgettext"
CONFIGURE_ENV+= "GNOME_DATADIR=/usr/lib/xscreensaver/config"
CONFIGURE_ENV+= "GLADE_DATADIR=/usr/lib/xscreensaver/config"
CONFIGURE_OPTIONS+=    --enable-maintainer-mode
CONFIGURE_OPTIONS+=    --with-gnome
CONFIGURE_OPTIONS+=    --enable-gtk-doc
CONFIGURE_OPTIONS+=    --with-gtk2=/usr
CONFIGURE_OPTIONS+=    --with-pixbuf=/usr 
CONFIGURE_OPTIONS+=    --enable-locking
CONFIGURE_OPTIONS+=    --with-pam=/usr 
CONFIGURE_OPTIONS+=    --without-shadow
CONFIGURE_OPTIONS+=    --without-kerberos 
CONFIGURE_OPTIONS+=    --with-dpms
CONFIGURE_OPTIONS+=    --with-xinput-ext
CONFIGURE_OPTIONS+=    --with-randr-ext
CONFIGURE_OPTIONS+=    --enable-root-passwd
@@ -80,13 +71,6 @@
CONFIGURE_OPTIONS+=    --with-text-file=/etc/motd
CONFIGURE_OPTIONS+=    --with-x-app-defaults=/usr/share/X11/app-defaults
COMPONENT_POST_CONFIGURE_ACTION+=    ( \
    cd $(@D)/po && \
    make generate_potfiles_in -o Makefile && \
    make POTFILES -o Makefile && \
    make generate_potfiles_in POTFILES xscreensaver.pot -o Makefile &&  \
    touch stamp-it )
COMPONENT_INSTALL_ENV += MAKEFLAGS=-e install_prefix=$(PROTO_DIR)
../rss-glx/build/i86/.built:
@@ -99,17 +83,13 @@
    perl ../rss-glx/build/i86/utils/rss-glx_install.pl $(PROTO_DIR)/usr/share/X11/app-defaults/XScreenSaver
test:        $(NO_TESTS)
REQUIRED_PACKAGES += gnome/accessibility/at-spi
REQUIRED_PACKAGES += gnome/config/gconf
REQUIRED_PACKAGES += library/desktop/atk
REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
REQUIRED_PACKAGES += library/desktop/gtk2
REQUIRED_PACKAGES += library/desktop/libglade
REQUIRED_PACKAGES += library/desktop/pango
REQUIRED_PACKAGES += library/glib2
REQUIRED_PACKAGES += library/libbonobo
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += library/orbit2
REQUIRED_PACKAGES += library/perl-5/xml-parser
REQUIRED_PACKAGES += runtime/perl-522
REQUIRED_PACKAGES += system/library
components/desktop/xscreensaver/files/po-sun/de.po
File was deleted
components/desktop/xscreensaver/files/po-sun/es.po
File was deleted
components/desktop/xscreensaver/files/po-sun/fr.po
File was deleted
components/desktop/xscreensaver/files/po-sun/it.po
File was deleted
components/desktop/xscreensaver/files/po-sun/ja.po
File was deleted
components/desktop/xscreensaver/files/po-sun/ko.po
File was deleted
components/desktop/xscreensaver/files/po-sun/pl.po
File was deleted
components/desktop/xscreensaver/files/po-sun/pt_BR.po
File was deleted
components/desktop/xscreensaver/files/po-sun/ru.po
File was deleted
components/desktop/xscreensaver/files/po-sun/sv.po
File was deleted
components/desktop/xscreensaver/files/po-sun/zh_CN.po
File was deleted
components/desktop/xscreensaver/files/po-sun/zh_TW.po
File was deleted
components/desktop/xscreensaver/manifests/sample-manifest.p5m
@@ -10,7 +10,7 @@
#
#
# Copyright 2016 <contributor>
# Copyright 2017 <contributor>
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
@@ -254,7 +254,7 @@
file path=usr/lib/xscreensaver/config/screensaver-locking.png
file path=usr/lib/xscreensaver/config/screensaver-power.png
file path=usr/lib/xscreensaver/config/screensaver-snap.png
file path=usr/lib/xscreensaver/config/xscreensaver-demo.glade2
file path=usr/lib/xscreensaver/config/xscreensaver-demo.ui
file path=usr/lib/xscreensaver/hacks/abstractile
file path=usr/lib/xscreensaver/hacks/anemone
file path=usr/lib/xscreensaver/hacks/anemotaxis
components/desktop/xscreensaver/patches/0000-Port-from-libglade-to-GtkBuilder.patch
New file
Diff too large
components/desktop/xscreensaver/patches/xscreensaver-04-solaris-paths.patch
@@ -1,25 +1,7 @@
/*
 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
From bebe3185c9f754e6d672e47eb2e330c7cb80aa7f Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat, 2 Jan 2016 19:59:16 -0800
Subject: [PATCH] Solaris paths
Various fixes to deal with where we install things on Solaris:
@@ -36,27 +18,28 @@
  instead of opening a web browser to view the man page at jwz.org or
  opening a gnome-terminal to run the man command.
Mostly not acceptable upstream.
Backport notes: this change relies on the gnome-help version delivered in
Nevada that supports "man:xscreensaver" style URL's to display man pages.
When backporting to older releases you will probably want to uncomment the
Solaris 11 that supports "man:xscreensaver" style URL's to display man pages.
When backporting to Solaris 10 you will probably want to uncomment the
lines shown for GNOME 2.4/2.6.
Also, you'll need to fix the package names shown when the hacks are not
installed to be the older SUNWxscreensaver-*, and to not use the a href
markup links added in newer gtk versions, nor link to IPS .p5i files to
install the packages.
installed to be the older SUNWxscreensaver-* for Solaris 10.
---
 driver/Makefile.in              |    9 ++++--
 driver/XScreenSaver.ad.in       |   14 +++++++---
 driver/demo-Gtk.c               |    4 +-
 driver/subprocs.c               |   54 +++++++++++++++++++++++++++++++++++++-
 driver/xscreensaver-demo.glade2 |    8 +++--
 driver/xscreensaver-text        |    6 +++-
 driver/xscreensaver.man         |    5 +--
 hacks/glx/Makefile.in           |    4 +-
 8 files changed, 84 insertions(+), 20 deletions(-)
 driver/Makefile.in             |  9 ++++---
 driver/XScreenSaver.ad.in      | 14 +++++++----
 driver/demo-Gtk.c              |  4 ++--
 driver/subprocs.c              | 54 ++++++++++++++++++++++++++++++++++++++++--
 driver/xscreensaver-demo.ui.in |  5 ++--
 driver/xscreensaver-text       |  6 ++++-
 driver/xscreensaver.man        |  5 ++--
 hacks/glx/Makefile.in          |  4 ++--
 8 files changed, 82 insertions(+), 19 deletions(-)
diff --git driver/Makefile.in driver/Makefile.in
diff --git a/driver/Makefile.in b/driver/Makefile.in
index b24536e..7c41ac0 100644
--- driver/Makefile.in
+++ driver/Makefile.in
@@ -27,7 +27,7 @@ INTLTOOL_MERGE    = @INTLTOOL_MERGE@
@@ -82,31 +65,30 @@
 CONF_DEFS    = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
 
 LIBS        = @LIBS@
diff --git driver/XScreenSaver.ad.in driver/XScreenSaver.ad.in
diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in
index 22d5bcb..3e1ff8a 100644
--- driver/XScreenSaver.ad.in
+++ driver/XScreenSaver.ad.in
@@ -90,18 +90,24 @@
@@ -90,18 +90,21 @@
 
 ! This is the URL loaded by the "Help" button on the splash screen,
 ! and by the "Documentation" menu item in xscreensaver-demo.
-*helpURL: https://www.jwz.org/xscreensaver/man.html
+*helpURL: helpURL: man:xscreensaver
+*helpURL: man:xscreensaver
 
 ! loadURL       -- how the "Help" buttons load the helpURL (/bin/sh syntax.)
 ! manualCommand -- how the "Documentation" buttons display man pages.
 !
 ! And there are so very many options to choose from!
+!   Modern GNOME:
+!
+*loadURL: gnome-help '%s'
+*manualCommand: gnome-help 'man:%s'
+!
 !
 !   Gnome 2.4, 2.6: (yelp can't display man pages, as of 2.6.3)
-!   Gnome 2.4, 2.6: (yelp can't display man pages, as of 2.6.3)
+!   Modern GNOME:
 !
-@GNOME24@*loadURL: @WITH_BROWSER@ '%s'
-@GNOME24@*manualCommand: gnome-terminal --title '%s manual' \
-@GNOME24@        --command '/bin/sh -c "man %s; read foo"'
+*loadURL: gnome-help '%s'
+*manualCommand: gnome-help 'man:%s'
+!*loadURL: gnome-terminal --title 'xscreensaver manual' \
+!              --command '/bin/ksh -c "man xscreensaver; read foo"'
+!*manualCommand: gnome-terminal --title '%s manual' \
@@ -114,10 +96,11 @@
 !
 !   Gnome 2.2:
 !
diff --git driver/demo-Gtk.c driver/demo-Gtk.c
diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c
index 87ae8a5..adb097f 100644
--- driver/demo-Gtk.c
+++ driver/demo-Gtk.c
@@ -991,7 +991,7 @@ restart_menu_cb (GtkWidget *widget, gpointer user_data)
@@ -1004,7 +1004,7 @@ restart_menu_cb (GtkWidget *widget, gpointer user_data)
   flush_dialog_changes_and_save (s);
   xscreensaver_command (GDK_DISPLAY(), XA_EXIT, 0, False, NULL);
   sleep (1);
@@ -126,7 +109,7 @@
     fprintf (stderr, "%s: fork error\n", blurb());
 
   await_xscreensaver (s);
@@ -4951,7 +4951,7 @@ main (int argc, char **argv)
@@ -4965,7 +4965,7 @@ main (int argc, char **argv)
 
       if (init_results == 1)
     {
@@ -135,7 +118,8 @@
       return 0;
     }
 
diff --git driver/subprocs.c driver/subprocs.c
diff --git a/driver/subprocs.c b/driver/subprocs.c
index ecbaeb2..9414df1 100644
--- driver/subprocs.c
+++ driver/subprocs.c
@@ -14,6 +14,7 @@
@@ -146,7 +130,7 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
@@ -791,6 +792,8 @@ print_path_error (const char *program)
@@ -799,6 +800,8 @@ print_path_error (const char *program)
   free (cmd);
   perror (buf);
 
@@ -155,7 +139,7 @@
   if (errno == ENOENT &&
       (token = getenv("PATH")))
     {
@@ -821,6 +824,7 @@ print_path_error (const char *program)
@@ -829,6 +832,7 @@ print_path_error (const char *program)
         }
       fprintf (stderr, "\n");
     }
@@ -163,7 +147,7 @@
 }
 
 
@@ -877,12 +881,42 @@ fork_and_exec (saver_screen_info *ssi, const char *command)
@@ -885,12 +889,42 @@ fork_and_exec (saver_screen_info *ssi, const char *command)
   return forked;
 }
 
@@ -206,7 +190,7 @@
   XFlush (si->dpy);
 
   if (!monitor_powered_on_p (si))
@@ -962,6 +996,12 @@ spawn_screenhack (saver_screen_info *ssi)
@@ -970,6 +1004,12 @@ spawn_screenhack (saver_screen_info *ssi)
         ;
     }
 
@@ -219,7 +203,7 @@
       if (new_hack < 0)   /* don't run a hack */
         {
           ssi->current_hack = -1;
@@ -1009,7 +1049,17 @@ spawn_screenhack (saver_screen_info *ssi)
@@ -1017,7 +1057,17 @@ spawn_screenhack (saver_screen_info *ssi)
       if (si->selection_mode < 0)
     si->selection_mode = 0;
 
@@ -238,7 +222,7 @@
       switch ((int) forked)
     {
     case -1: /* fork failed */
@@ -1186,7 +1236,7 @@ get_best_gl_visual (saver_info *si, Screen *screen)
@@ -1196,7 +1246,7 @@ get_best_gl_visual (saver_info *si, Screen *screen)
   char *av[10];
   int ac = 0;
 
@@ -247,29 +231,27 @@
   av[ac] = 0;
 
   if (pipe (fds))
diff --git driver/xscreensaver-demo.glade2 driver/xscreensaver-demo.glade2
--- driver/xscreensaver-demo.glade2.in
+++ driver/xscreensaver-demo.glade2.in
@@ -927,10 +927,12 @@ Installed</property>
                   <property name="visible">True</property>
                   <property name="label" translatable="yes">Very few (or no) screen savers appear to be available.
diff --git a/driver/xscreensaver-demo.ui.in b/driver/xscreensaver-demo.ui.in
index 9c31a9b..c04a331 100644
--- driver/xscreensaver-demo.ui.in
+++ driver/xscreensaver-demo.ui.in
@@ -950,8 +950,9 @@ Installed</property>
                                 <property name="visible">True</property>
                                 <property name="label" translatable="yes">Very few (or no) screen savers appear to be available.
 
-This probably means that the &quot;xscreensaver-extras&quot; and
-&quot;xscreensaver-gl-extras&quot; packages are not installed.</property>
+This probably means that the "&lt;a href="file:/usr/lib/xscreensaver/config/xscreensaver-hacks.p5i"&gt;desktop/xscreensaver/hacks&lt;/a&gt;,"
+"&lt;a href="file:/usr/lib/xscreensaver/config/xscreensaver-hacks-gl.p5i"&gt;desktop/xscreensaver/hacks/hacks-gl&lt;/a&gt;," and
+"&lt;a href="file:/usr/lib/xscreensaver/config/rss-glx.p5i"&gt;desktop/xscreensaver/hacks/rss-glx&lt;/a&gt;" packages
+are not installed.</property>
                   <property name="use_underline">False</property>
-                  <property name="use_markup">False</property>
+                  <property name="use_markup">True</property>
                   <property name="justify">GTK_JUSTIFY_CENTER</property>
                   <property name="wrap">False</property>
                   <property name="selectable">False</property>
diff --git driver/xscreensaver-text driver/xscreensaver-text
--- driver/xscreensaver-text.~1~    2014-11-02 07:48:03.000000000 +0300
+++ driver/xscreensaver-text    2015-02-17 23:25:56.513099412 +0300
@@ -566,12 +566,15 @@
-This probably means that the "xscreensaver-extras" and
-"xscreensaver-gl-extras" packages are not installed.</property>
+This probably means that the “desktop/xscreensaver/hacks” and
+“desktop/xscreensaver/hacks/hacks-gl” packages are not installed.
+                                </property>
                                 <property name="use_underline">False</property>
                                 <property name="use_markup">False</property>
                                 <property name="justify">GTK_JUSTIFY_CENTER</property>
diff --git a/driver/xscreensaver-text b/driver/xscreensaver-text
index 8199829..921d5c7 100755
--- driver/xscreensaver-text
+++ driver/xscreensaver-text
@@ -569,12 +569,15 @@ sub reformat_rss($) {
     $i++;
 
     my ($title, $body1, $body2, $body3);
@@ -285,7 +267,11 @@
     # If there are both <description> and <content> or <content:encoded>,
     # use whichever one contains more text.
     #
@@ -598,7 +601,7 @@
@@ -598,10 +601,11 @@ sub reformat_rss($) {
     $title = rss_field_to_html ($title || '');
     $body1 = rss_field_to_html ($body1 || '');
+    $author = rss_field_to_html ($author || '');
 
     $title = '' if ($body1 eq $title);  # Identical in Twitter's atom feed.
 
@@ -294,6 +280,8 @@
     $out .= "\n";
   }
 
diff --git a/driver/xscreensaver.man b/driver/xscreensaver.man
index 11f5b02..9ad7509 100644
--- driver/xscreensaver.man
+++ driver/xscreensaver.man
@@ -97,9 +97,8 @@ xscreensaver-command -restart
@@ -308,10 +296,11 @@
 
 When settings are changed in the Preferences dialog box (see above)
 the current settings will be written to the \fI.xscreensaver\fP file.
diff --git hacks/glx/Makefile.in hacks/glx/Makefile.in
diff --git a/hacks/glx/Makefile.in b/hacks/glx/Makefile.in
index 211d356..23c68d4 100644
--- hacks/glx/Makefile.in
+++ hacks/glx/Makefile.in
@@ -278,7 +278,7 @@ install-program:: $(EXES)
@@ -303,7 +303,7 @@ install-program:: $(EXES)
 # the xscreensaver-gl-helper program, in $bindir
 install-program:: $(EXES)
     @exes="@GL_UTIL_EXES@" ;                    \
@@ -320,7 +309,7 @@
      if [ "$$exes" != "" ]; then                    \
        if [ ! -d $$idir ]; then                    \
          $(INSTALL_DIRS) $$idir ;                    \
@@ -347,7 +347,7 @@ uninstall-program::
@@ -372,7 +372,7 @@ uninstall-program::
 # the xscreensaver-gl-helper program, in $bindir
 uninstall-program::
     @exes="$(GL_UTIL_EXES)" ;                    \
@@ -329,4 +318,5 @@
      for program in $$exes; do                    \
        echo rm -f $$idir/$$program ;                \
         rm -f $$idir/$$program ;                \
--
2.7.4
components/desktop/xscreensaver/patches/xscreensaver-06-gtk-lock.patch
@@ -530,7 +530,7 @@
new file mode 100644
--- /dev/null
+++ driver/lock-Gtk.c
@@ -0,0 +1,955 @@
@@ -0,0 +1,730 @@
+/* lock-Gtk.c -- a GTK+ password dialog for xscreensaver
+ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
+ *
@@ -599,8 +599,6 @@
+#include <X11/Xmu/WinUtil.h>
+
+#include <gconf/gconf-client.h>
+#include <libbonobo.h>
+#include <login-helper/Accessibility_LoginHelper.h>
+#include <atk/atkobject.h>
+
+#include "remote.h"
@@ -1171,11 +1169,6 @@
+  int i;
+
+  gboolean  at_enable  = FALSE; /* accessibility mode enabled ? */
+  Bonobo_ServerInfoList *server_list = NULL;
+  CORBA_Environment ev;
+  Accessibility_LoginHelper helper;
+  Accessibility_LoginHelper *helper_list = NULL;
+  CORBA_boolean safe;
+  gboolean center_position = TRUE; /* center dialog on screen? */
+
+#ifdef ENABLE_NLS
@@ -1240,33 +1233,7 @@
+      if (!modulesptr || modulesptr [0] == '\0')
+        putenv ("GTK_MODULES=gail:atk-bridge");
+
+      CORBA_exception_init (&ev);
+      if (!bonobo_init (&argc, argv))
+        {
+          g_error ("Can't initialize Bonobo");
+        }
+
+      /* bonobo-activation query lists existing instances */
+      server_list = bonobo_activation_query (
+        "(repo_ids.has('IDL:Accessibility/LoginHelper:1.0')) AND _active",
+        NULL, &ev);
+
+      if (BONOBO_EX (&ev))
+        {
+          bonobo_debug_shutdown ();
+          g_error ("LoginHelper query failed : %s",
+                   bonobo_exception_get_text (&ev));
+          /* not reached (below) because g_error exits */
+          CORBA_exception_free (&ev);
+        }
+
+      /*
+       * 6182506: unlock dialog can be obscured by the magnifier window
+       * if it's always centered, so don't force that if any accessibility
+       * helpers are present
+       */
+      if (server_list && server_list->_length)
+        center_position = FALSE;
+      center_position = FALSE;
+    } /* accessibility enabled */
+
+  pwd = make_dialog (center_position);
@@ -1281,178 +1248,6 @@
+  gdk_window_add_filter (GET_WINDOW (pwd->dialog), dialog_filter_func, pwd);
+  write_windowid ("dialog_win", GDK_WINDOW_XID (GET_WINDOW (pwd->dialog)));
+
+  if (server_list && server_list->_length)
+    {
+      /* debug only
+      g_message ("%d LoginHelpers are running.",
+                 server_list ? server_list->_length : 0);
+      */
+
+      helper_list = g_new0 (Accessibility_LoginHelper, server_list->_length);
+
+      /* for each instance... */
+      for (i = 0; i < server_list->_length; i++)
+        {
+          Bonobo_Unknown server;
+          Bonobo_ServerInfo info = server_list->_buffer[i];
+
+          server = bonobo_activation_activate_from_id (
+              info.iid, Bonobo_ACTIVATION_FLAG_EXISTING_ONLY, NULL, &ev);
+
+          if (BONOBO_EX (&ev))
+            {
+              g_warning ("Error activating server %d: %s", i,
+                         bonobo_exception_get_text (&ev));
+              CORBA_exception_free (&ev);
+              continue;
+            }
+          else if (server == CORBA_OBJECT_NIL)
+            {
+              g_warning ("Activated server %d is NIL!", i);
+              continue;
+            }
+
+          bonobo_activate ();
+
+          helper = Bonobo_Unknown_queryInterface
+            (server, "IDL:Accessibility/LoginHelper:1.0", &ev);
+
+          if (BONOBO_EX (&ev))
+            {
+              g_warning ("Error performing interface query: %s",
+                         bonobo_exception_get_text (&ev));
+              CORBA_exception_free (&ev);
+              continue;
+            }
+          else if (helper == CORBA_OBJECT_NIL)
+            {
+              g_warning ("Activated an object which advertised LoginHelper but does not implement it!");
+              continue;
+            }
+
+          helper_list[i] = helper;
+          bonobo_object_release_unref (server, &ev);
+
+          if (helper && !BONOBO_EX (&ev))
+            {
+              /* ask the helper to go into safe mode */
+              safe = Accessibility_LoginHelper_setSafe (helper, TRUE, &ev);
+              if (BONOBO_EX (&ev))
+                {
+                  g_warning ("setSafe(TRUE) failed: %s",
+                             bonobo_exception_get_text (&ev));
+                  CORBA_exception_free (&ev);
+                }
+
+              /* get the raise window list (if the program went into safe mode) */
+              if (safe)
+                {
+                  int j;
+                  gboolean needs_windows_raised = FALSE;
+                  Accessibility_LoginHelper_DeviceReqList *list;
+
+                  g_debug ("safe");
+
+                  /* does this helper need to have windows raised? */
+                  list = Accessibility_LoginHelper_getDeviceReqs (helper, &ev);
+
+                  if (BONOBO_EX (&ev))
+                    {
+                      g_warning ("Bonobo exception getting Device Requirements: %s",
+                                 bonobo_exception_get_text (&ev));
+                      CORBA_exception_free (&ev);
+                    }
+                  else
+                    {
+                      g_debug ("LoginHelper device requirements: ");
+                      if (list->_length == 0)
+                        g_debug (" - None.");
+
+                      for (j = 0; j < list->_length; j++)
+                        {
+                          switch (list->_buffer[j])
+                            {
+                            case Accessibility_LoginHelper_GUI_EVENTS:
+                              g_debug (" - Needs access to the GUI event subsystem (e.g. Xserver)");
+                              break;
+                            case Accessibility_LoginHelper_CORE_KEYBOARD:
+                              g_debug (" - Needs access to core keyboard device");
+                              write_to_parent("ungrab_keyboard", "true", FALSE);
+                              break;
+                            case Accessibility_LoginHelper_CORE_POINTER:
+                              g_debug (" - Needs access to core pointer device");
+                              write_to_parent("ungrab_pointer", "true", FALSE);
+                              break;
+                            case Accessibility_LoginHelper_EXT_INPUT:
+                              g_debug (" - Reads XInput extended input devices");
+                              break;
+                            case Accessibility_LoginHelper_POST_WINDOWS:
+                              g_debug (" - Posts windows");
+                              needs_windows_raised = TRUE;
+                              break;
+                            case Accessibility_LoginHelper_AUDIO_OUT:
+                              g_debug (" - Writes to audio device");
+                              break;
+                            case Accessibility_LoginHelper_AUDIO_IN:
+                              g_debug (" - Reads from audio device");
+                              break;
+                            case Accessibility_LoginHelper_LOCALHOST:
+                              g_debug (" - Needs LOCALHOST network connection");
+                              break;
+                            case Accessibility_LoginHelper_SERIAL_OUT:
+                              g_debug (" - Needs to write to one or more serial ports");
+                              break;
+                            default:
+                              break;
+                            }
+                        }
+                      CORBA_free (list);
+                    }
+
+                  if (needs_windows_raised)
+                    {
+                      Accessibility_LoginHelper_WindowList *windows
+                        = Accessibility_LoginHelper_getRaiseWindows
+                        (helper, &ev);
+
+                      if (BONOBO_EX (&ev))
+                        {
+                          g_warning ("getRaiseWindows failed: %s",
+                                     bonobo_exception_get_text (&ev));
+                          CORBA_exception_free (&ev);
+                        }
+
+                      g_debug ("%d windows need raising", windows->_length);
+                      for (j = 0; j < windows->_length; j++)
+                        {
+                          Window wid = windows->_buffer[j].winID;
+                          g_debug ("Window ID = 0x%lx", wid);
+                          if (wid)
+                            write_windowid ("raise_win", wid);
+                        }
+                    }
+                }
+              else
+                {
+                  g_warning ("LoginHelper %d did not go into safe mode", i);
+                }
+            }
+           else
+            {
+              if (BONOBO_EX (&ev))
+                {
+                  g_warning ("Error activating %s: %s",
+                             info.iid, bonobo_exception_get_text (&ev));
+                  CORBA_exception_free (&ev);
+                }
+              else
+                {
+                  g_warning ("no active instance of %s found", info.iid);
+                }
+            }
+        }
+    } /* accessibility helpers active */
+
+  /* Flush dialog window ids & any messages about login helpers to parent */
+  write_to_parent(NULL, NULL, TRUE);
+
@@ -1462,26 +1257,6 @@
+  g_io_add_watch (ioc, G_IO_IN | G_IO_HUP, handle_input, pwd);
+
+  gtk_main ();
+
+  /* Reset accessibility helpers back to non-safe mode now that we're done */
+  if (server_list)
+    {
+      for (i = 0; i < server_list->_length; i++)
+        {
+          helper = helper_list[i];
+          /* really no need to check the return value this time */
+          Accessibility_LoginHelper_setSafe (helper, FALSE, &ev);
+          if (BONOBO_EX (&ev))
+            {
+              g_warning ("setSafe(FALSE) failed: %s",
+                         bonobo_exception_get_text (&ev));
+              CORBA_exception_free (&ev);
+            }
+          CORBA_Object_release (helper, &ev);
+        }
+      CORBA_free (server_list);
+      bonobo_debug_shutdown ();
+    }
+
+  return 0;
+}
components/desktop/xscreensaver/patches/xscreensaver-07-allow-root.patch
@@ -1,61 +1,31 @@
/*
 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
From 42a34d66f5455bb0899f189a38539affbae0e212 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat, 2 Jan 2016 20:56:50 -0800
Subject: [PATCH] allow root
Fix for: 4849641: xscreensaver won't run as root
Fix for: Bug 15155994 - SUNBT4849641 xscreensaver won't run as root
Let root lock the screen, but don't launch the hacks for root.
(Upstream maintainer argues instead that users should not login as root,
 which is correct, but not something we can force our customers to stop
 doing.  See http://www.jwz.org/xscreensaver/faq.html#root-lock for his side.)
---
 driver/demo-Gtk.c     |   26 ++++++++++++++++++++++++++
 driver/exec.c         |    2 ++
 driver/setuid.c       |   12 ++++++++++++
 driver/subprocs.c     |    3 +++
 driver/timers.c       |    2 +-
 driver/xscreensaver.c |    7 ++++---
 6 files changed, 48 insertions(+), 4 deletions(-)
Rejected by upstream because upstream author argues instead that users should
not login as root, which is correct, but not something we can force all of
our customers to stop doing.
diff --git driver/demo-Gtk.c driver/demo-Gtk.c
See http://www.jwz.org/xscreensaver/faq.html#root-lock for his side.
---
 driver/demo-Gtk.c     | 15 +++++++++++++++
 driver/exec.c         |  2 ++
 driver/setuid.c       | 12 ++++++++++++
 driver/subprocs.c     |  3 +++
 driver/timers.c       |  2 +-
 driver/xscreensaver.c |  7 ++++---
 6 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c
index d62152c..f6f9c19 100644
--- driver/demo-Gtk.c
+++ driver/demo-Gtk.c
@@ -687,6 +687,14 @@ run_cmd (state *s, Atom command, int arg)
   char *err = 0;
   int status;
+  if (getuid () == 0)
+    {
+      char buf [255];
+      strlcpy (buf, _("Can not run hacks if logged in as root!"), sizeof(buf));
+      warning_dialog (s->toplevel_widget, buf, False, 100);
+      return;
+    }
+
   flush_dialog_changes_and_save (s);
   status = xscreensaver_command (GDK_DISPLAY(), command, arg, False, &err);
@@ -717,6 +725,14 @@ run_hack (state *s, int list_elt, Bool report_errors_p)
@@ -723,6 +723,14 @@ run_hack (state *s, int list_elt, Bool report_errors_p)
   char *err = 0;
   int status;
 
@@ -70,31 +40,22 @@
   if (list_elt < 0) return;
   hack_number = s->list_elt_to_hack_number[list_elt];
 
@@ -5155,6 +5171,15 @@ main (int argc, char **argv)
     GtkMenu *menu = GTK_MENU (gtk_option_menu_get_menu (opt));
     GList *kids = gtk_container_children (GTK_CONTAINER (menu));
     int i;
+
+    if (getuid () == 0)
+      {
+        /* If logged in as root disable menu so user can't activate a hack. */
+        gtk_widget_set_sensitive (GTK_WIDGET (opt), False);
+        gtk_widget_set_sensitive (GTK_WIDGET (menu), False);
+      }
+    else
+    {
     for (i = 0; kids; kids = kids->next, i++)
       {
         gtk_signal_connect (GTK_OBJECT (kids->data), "activate",
@@ -5168,6 +5193,7 @@ main (int argc, char **argv)
             mode_menu_order[i] == RANDOM_HACKS_SAME)
           gtk_widget_hide (GTK_WIDGET (kids->data));
       }
+    }
@@ -5163,6 +5171,13 @@ main (int argc, char **argv)
                       (gpointer) s);
 #endif /* !HAVE_GTK2 */
 
     if (s->nscreens <= 1)   /* recompute option-menu size */
       {
diff --git driver/exec.c driver/exec.c
+  if (getuid () == 0)
+    {
+      /* If logged in as root disable menu so user can't activate a hack. */
+      gtk_widget_set_sensitive (GTK_WIDGET (name_to_widget (s, "mode_menu")),
+                False);
+    }
+  else
   /* Hook up callbacks to the items on the mode menu. */
   gtk_signal_connect (GTK_OBJECT (name_to_widget (s, "mode_menu")),
                       "changed", GTK_SIGNAL_FUNC (mode_menu_item_cb),
diff --git a/driver/exec.c b/driver/exec.c
index 38ca88a..b68089e 100644
--- driver/exec.c
+++ driver/exec.c
@@ -186,6 +186,7 @@ exec_command (const char *shell, const char *command, int nice_level)
@@ -113,7 +74,8 @@
 
   if (hairy_p)
     /* If it contains any shell metacharacters, do it the hard way,
diff --git driver/setuid.c driver/setuid.c
diff --git a/driver/setuid.c b/driver/setuid.c
index a17194a..e3aa78d 100644
--- driver/setuid.c
+++ driver/setuid.c
@@ -121,6 +121,10 @@ set_ids_by_number (uid_t uid, gid_t gid, char **message_ret)
@@ -169,10 +131,11 @@
     si->dangerous_uid_p = True;
       }
   }
diff --git driver/subprocs.c driver/subprocs.c
diff --git a/driver/subprocs.c b/driver/subprocs.c
index a244f36..c975813 100644
--- driver/subprocs.c
+++ driver/subprocs.c
@@ -939,6 +939,9 @@ spawn_screenhack (saver_screen_info *ssi)
@@ -947,6 +947,9 @@ spawn_screenhack (saver_screen_info *ssi)
   saver_preferences *p = &si->prefs;
   char* complete_hack_command;
 
@@ -182,10 +145,11 @@
   if (si->prefs.verbose_p)
    fprintf(stderr, "--> spawn_screenhack()\n");
 
diff --git driver/timers.c driver/timers.c
diff --git a/driver/timers.c b/driver/timers.c
index 9afc752..32728a0 100644
--- driver/timers.c
+++ driver/timers.c
@@ -282,7 +282,7 @@ cycle_timer (XtPointer closure, XtIntervalId *id)
@@ -284,7 +284,7 @@ cycle_timer (XtPointer closure, XtIntervalId *id)
 
       raise_window (si, True, True, False);
 
@@ -194,10 +158,11 @@
         for (i = 0; i < si->nscreens; i++)
           spawn_screenhack (&si->screens[i]);
       else
diff --git driver/xscreensaver.c driver/xscreensaver.c
diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c
index 33d357a..f357281 100644
--- driver/xscreensaver.c
+++ driver/xscreensaver.c
@@ -458,6 +458,7 @@ startup_ehandler (String name, String type, String class,
@@ -487,6 +487,7 @@ startup_ehandler (String name, String type, String class,
 
   describe_uids (si, stderr);
 
@@ -205,7 +170,7 @@
   if (si->orig_uid && !strncmp (si->orig_uid, "root/", 5))
     {
       fprintf (stderr, "\n"
@@ -471,11 +472,11 @@ startup_ehandler (String name, String type, String class,
@@ -500,11 +501,11 @@ startup_ehandler (String name, String type, String class,
                blurb());
     }
   else
@@ -219,7 +184,7 @@
            blurb());
     }
 
@@ -1269,7 +1270,7 @@ main_loop (saver_info *si)
@@ -1338,7 +1339,7 @@ main_loop (saver_info *si)
         kill_screenhack (&si->screens[i]);
 
       raise_window (si, True, True, False);
@@ -228,3 +193,6 @@
         fprintf (stderr, "%s: not launching hack (throttled.)\n", blurb());
       else
         for (i = 0; i < si->nscreens; i++)
--
2.7.4
components/desktop/xscreensaver/patches/xscreensaver-08-passwdTimeout-pref.patch
@@ -1,47 +1,29 @@
/*
 * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
From 27b30da105ba07182ba7bea9aee62deaad39f74d Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat, 2 Jan 2016 22:02:23 -0800
Subject: [PATCH] passwdTimeout pref
Sun bug 5077981/GNOME bug 147579:
        There should be an option to extend/disable lockout timer
        http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=5077981
        http://bugzilla.gnome.org/show_bug.cgi?id=147579
Bug 15220000 SUNBT5077981 There should be an option to extend/disable lockout
                          timer
aka http://bugzilla.gnome.org/show_bug.cgi?id=147579
Sun bug 6176524:
        passwdTimeoutEnable for disabled user (xscreensaver-lock)
        http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6176524
Bug 15231258 SUNBT6176524 passwdTimeoutEnable for disabled user
Upstream status unknown.
---
 driver/XScreenSaver.ad.in       |    1 +
 driver/demo-Gtk.c               |   13 +++++
 driver/lock.c                   |    8 +++
 driver/prefs.c                  |    6 ++
 driver/types.h                  |    2 +
 driver/xscreensaver-demo.glade2 |   98 ++++++++++++++++++++++++++++++++++++++-
 6 files changed, 127 insertions(+), 1 deletions(-)
 driver/XScreenSaver.ad.in      |   1 +
 driver/demo-Gtk.c              |  13 ++++++
 driver/lock.c                  |   8 ++++
 driver/prefs.c                 |   6 +++
 driver/types.h                 |   2 +
 driver/xscreensaver-demo.ui.in | 103 ++++++++++++++++++++++++++++++++++++++++-
 6 files changed, 131 insertions(+), 2 deletions(-)
diff --git driver/XScreenSaver.ad.in driver/XScreenSaver.ad.in
diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in
index 3e1ff8a..0a0ccf8 100644
--- driver/XScreenSaver.ad.in
+++ driver/XScreenSaver.ad.in
@@ -34,6 +34,7 @@
@@ -33,6 +33,7 @@
 *cycle:            0:10:00
 *lockTimeout:        0:00:00
 *passwdTimeout:        0:02:00
@@ -49,10 +31,11 @@
 *dpmsEnabled:        True
 *dpmsQuickoffEnabled:    False
 *dpmsStandby:        0:10:00
diff --git driver/demo-Gtk.c driver/demo-Gtk.c
diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c
index f6f9c19..e78c3ed 100644
--- driver/demo-Gtk.c
+++ driver/demo-Gtk.c
@@ -1558,6 +1558,8 @@ flush_dialog_changes_and_save (state *s)
@@ -1576,6 +1576,8 @@ flush_dialog_changes_and_save (state *s)
 
   MINUTES  (&p2->timeout,         "timeout_spinbutton");
   MINUTES  (&p2->cycle,           "cycle_spinbutton");
@@ -61,7 +44,7 @@
   CHECKBOX (p2->lock_p,           "lock_button");
   MINUTES  (&p2->lock_timeout,    "lock_spinbutton");
 
@@ -1660,6 +1662,8 @@ flush_dialog_changes_and_save (state *s)
@@ -1677,6 +1679,8 @@ flush_dialog_changes_and_save (state *s)
   COPY(cycle,          "cycle");
   COPY(lock_p,         "lock_p");
   COPY(lock_timeout,   "lock_timeout");
@@ -70,7 +53,7 @@
 
   COPY(dpms_enabled_p,  "dpms_enabled_p");
   COPY(dpms_quickoff_p, "dpms_quickoff_enabled_p");
@@ -2791,6 +2795,9 @@ populate_prefs_page (state *s)
@@ -2797,6 +2801,9 @@ populate_prefs_page (state *s)
   FMT_MINUTES ("timeout_spinbutton",      p->timeout);
   FMT_MINUTES ("cycle_spinbutton",        p->cycle);
   FMT_MINUTES ("lock_spinbutton",         p->lock_timeout);
@@ -80,7 +63,7 @@
   FMT_MINUTES ("dpms_standby_spinbutton", p->dpms_standby);
   FMT_MINUTES ("dpms_suspend_spinbutton", p->dpms_suspend);
   FMT_MINUTES ("dpms_off_spinbutton",     p->dpms_off);
@@ -2803,6 +2810,7 @@ populate_prefs_page (state *s)
@@ -2809,6 +2816,7 @@ populate_prefs_page (state *s)
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (name_to_widget (s,(NAME))),\
                                 (ACTIVEP))
 
@@ -88,7 +71,7 @@
   TOGGLE_ACTIVE ("lock_button",       p->lock_p);
 #if 0
   TOGGLE_ACTIVE ("verbose_button",    p->verbose_p);
@@ -2908,6 +2916,10 @@ populate_prefs_page (state *s)
@@ -2914,6 +2922,10 @@ populate_prefs_page (state *s)
 
     /* Blanking and Locking
      */
@@ -99,7 +82,7 @@
     SENSITIZE ("lock_button",     can_lock_p);
     SENSITIZE ("lock_spinbutton", can_lock_p && p->lock_p);
     SENSITIZE ("lock_mlabel",     can_lock_p && p->lock_p);
@@ -3082,6 +3094,7 @@ fix_text_entry_sizes (state *s)
@@ -3089,6 +3101,7 @@ fix_text_entry_sizes (state *s)
 # if 0   /* appears no longer necessary with Gtk 1.2.10 */
   const char * const spinbuttons[] = {
     "timeout_spinbutton", "cycle_spinbutton", "lock_spinbutton",
@@ -107,10 +90,11 @@
     "dpms_standby_spinbutton", "dpms_suspend_spinbutton",
     "dpms_off_spinbutton",
     "-fade_spinbutton" };
diff --git driver/lock.c driver/lock.c
diff --git a/driver/lock.c b/driver/lock.c
index a4114e2..abf86c0 100644
--- driver/lock.c
+++ driver/lock.c
@@ -1646,6 +1646,10 @@ update_passwd_window (saver_info *si, const char *printed_passwd, float ratio)
@@ -1651,6 +1651,10 @@ update_passwd_window (saver_info *si, const char *printed_passwd, float ratio)
       event.xclient.data.l[1] = 0;
       event.xclient.data.l[2] = 0;
 
@@ -121,7 +105,7 @@
       if (!safe_XSendEvent (si->dpy, si->passwd_dialog, False, 0L, &event))
         fprintf (stderr, "%s: error sending ratio to lock dialog\n", blurb ());
     }
@@ -2343,6 +2347,10 @@ passwd_animate_timer (XtPointer closure, XtIntervalId *id)
@@ -2358,6 +2362,10 @@ passwd_animate_timer (XtPointer closure, XtIntervalId *id)
 
   if (!pw) return;
 
@@ -132,10 +116,11 @@
 #ifdef HAVE_XSCREENSAVER_LOCK
   /* We want to make sure dialog is up before we update countdown timer */
   if (!si->passwd_dialog)
diff --git driver/prefs.c driver/prefs.c
diff --git a/driver/prefs.c b/driver/prefs.c
index 55bac7b..52538a8 100644
--- driver/prefs.c
+++ driver/prefs.c
@@ -251,6 +251,7 @@ static const char * const prefs[] = {
@@ -252,6 +252,7 @@ static const char * const prefs[] = {
   "lockVTs",            /* not saved */
   "lockTimeout",
   "passwdTimeout",
@@ -143,7 +128,7 @@
   "visualID",
   "installColormap",
   "verbose",
@@ -784,6 +785,9 @@ write_init_file (Display *dpy,
@@ -786,6 +787,9 @@ write_init_file (Display *dpy,
       CHECK("lockVTs")        continue;  /* don't save, unused */
       CHECK("lockTimeout")    type = pref_time, t = p->lock_timeout;
       CHECK("passwdTimeout")    type = pref_time, t = p->passwd_timeout;
@@ -153,7 +138,7 @@
       CHECK("visualID")        type = pref_str,  s =    visual_name;
       CHECK("installColormap")    type = pref_bool, b = p->install_cmap_p;
       CHECK("verbose")        type = pref_bool, b = p->verbose_p;
@@ -1068,6 +1072,8 @@ load_init_file (Display *dpy, saver_preferences *p)
@@ -1071,6 +1075,8 @@ load_init_file (Display *dpy, saver_preferences *p)
   p->lock_timeout    = 1000 * get_minutes_resource (dpy, "lockTimeout", "Time");
   p->cycle           = 1000 * get_minutes_resource (dpy, "cycle", "Time");
   p->passwd_timeout  = 1000 * get_seconds_resource (dpy, "passwdTimeout", "Time");
@@ -162,10 +147,11 @@
   p->pointer_timeout = 1000 * get_seconds_resource (dpy, "pointerPollTime", "Time");
   p->pointer_hysteresis = get_integer_resource (dpy, "pointerHysteresis","Integer");
   p->notice_events_timeout = 1000*get_seconds_resource(dpy,
diff --git driver/types.h driver/types.h
diff --git a/driver/types.h b/driver/types.h
index c77ee3f..b428f73 100644
--- driver/types.h
+++ driver/types.h
@@ -77,6 +77,8 @@ struct saver_preferences {
@@ -97,6 +97,8 @@ struct saver_preferences {
   Bool xsync_p;            /* whether XSynchronize has been called */
 
   Bool lock_p;            /* whether to lock as well as save */
@@ -174,118 +160,141 @@
 
   Bool fade_p;            /* whether to fade to black, if possible */
   Bool unfade_p;        /* whether to fade from black, if possible */
diff --git driver/xscreensaver-demo.glade2 driver/xscreensaver-demo.glade2
--- driver/xscreensaver-demo.glade2.in
+++ driver/xscreensaver-demo.glade2.in
@@ -165,7 +165,7 @@
           <child>
             <widget class="GtkTable" id="blanking_table">
               <property name="visible">True</property>
-              <property name="n_rows">3</property>
+              <property name="n_rows">4</property>
               <property name="n_columns">4</property>
               <property name="homogeneous">False</property>
               <property name="row_spacing">2</property>
@@ -466,6 +466,102 @@
               <property name="y_options"></property>
             </packing>
               </child>
+
+              <child>
+            <widget class="GtkSpinButton" id="pwd_spinbutton">
+              <property name="visible">True</property>
+              <property name="tooltip" translatable="yes">How long the unlock dialog waits for input before disappearing.</property>
+              <property name="can_focus">True</property>
+              <property name="climb_rate">15</property>
+              <property name="digits">0</property>
+              <property name="numeric">True</property>
+              <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+              <property name="snap_to_ticks">True</property>
+              <property name="wrap">False</property>
+              <property name="adjustment">0 0 720 1 15 15</property>
+              <accessibility>
+                <atkrelation target="pwd_button" type="controlled-by"/>
+                <atkrelation target="pwd_button" type="labelled-by"/>
+                <atkrelation target="pwd_mlabel" type="labelled-by"/>
+              </accessibility>
+              <signal name="activate" handler="pref_changed_cb"/>
+              <signal name="focus_out_event" handler="pref_changed_event_cb"/>
+              <signal name="value_changed" handler="pref_changed_cb"/>
+            </widget>
+            <packing>
+              <property name="left_attach">2</property>
+              <property name="right_attach">3</property>
+              <property name="top_attach">3</property>
+              <property name="bottom_attach">4</property>
+              <property name="y_padding">10</property>
+              <property name="x_options">fill</property>
+              <property name="y_options"></property>
+            </packing>
+              </child>
+
+              <child>
+            <widget class="GtkEventBox" id="pwd_button_eventbox">
+              <property name="visible">True</property>
+              <property name="tooltip" translatable="yes">Whether the unlock dialog box should disappear after a timeout.</property>
+              <property name="visible_window">True</property>
+              <property name="above_child">False</property>
+
+              <child>
+                <widget class="GtkCheckButton" id="pwd_button">
+                  <property name="visible">True</property>
+                  <property name="can_focus">True</property>
+                  <property name="label" translatable="yes">Timeout _Unlock After</property>
+                  <property name="use_underline">True</property>
+                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                  <property name="focus_on_click">True</property>
+                  <property name="active">False</property>
+                  <property name="inconsistent">False</property>
+                  <property name="draw_indicator">True</property>
+                  <accessibility>
+                <atkrelation target="pwd_spinbutton" type="controller-for"/>
+                <atkrelation target="pwd_spinbutton" type="label-for"/>
+                <atkrelation target="pwd_spinbutton" type="flows-to"/>
+                  </accessibility>
+                  <signal name="toggled" handler="pref_changed_cb"/>
+                </widget>
+              </child>
+            </widget>
+            <packing>
+              <property name="left_attach">0</property>
+              <property name="right_attach">2</property>
+              <property name="top_attach">3</property>
+              <property name="bottom_attach">4</property>
+              <property name="x_options">fill</property>
+              <property name="y_options">fill</property>
+            </packing>
+              </child>
+
+              <child>
+            <widget class="GtkLabel" id="pwd_mlabel">
+              <property name="visible">True</property>
+              <property name="label" translatable="yes">minutes</property>
+              <property name="use_underline">False</property>
+              <property name="use_markup">False</property>
+              <property name="justify">GTK_JUSTIFY_LEFT</property>
+              <property name="wrap">False</property>
+              <property name="selectable">False</property>
+              <property name="xalign">0</property>
+              <property name="yalign">0.5</property>
+              <property name="xpad">8</property>
+              <property name="ypad">0</property>
+              <accessibility>
+                <atkrelation target="pwd_spinbutton" type="label-for"/>
+                <atkrelation target="pwd_spinbutton" type="flows-from"/>
+              </accessibility>
+            </widget>
+            <packing>
+              <property name="left_attach">3</property>
+              <property name="right_attach">4</property>
+              <property name="top_attach">3</property>
+              <property name="bottom_attach">4</property>
+              <property name="y_options"></property>
+            </packing>
+              </child>
             </widget>
             <packing>
               <property name="left_attach">0</property>
diff --git a/driver/xscreensaver-demo.ui.in b/driver/xscreensaver-demo.ui.in
index c04a331..2281859 100644
--- driver/xscreensaver-demo.ui.in
+++ driver/xscreensaver-demo.ui.in
@@ -57,6 +57,14 @@
     <property name="page_size">0</property>
     <property name="value">0</property>
   </object>
+  <object class="GtkAdjustment" id="adjustment8">
+    <property name="upper">720</property>
+    <property name="lower">0</property>
+    <property name="page_increment">15</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">0</property>
+    <property name="value">0</property>
+  </object>
   <object class="GtkListStore" id="mode_menu_model">
     <columns>
       <column type="gchararray"/>
@@ -268,7 +276,7 @@
                     <child>
                       <object class="GtkTable" id="blanking_table">
                         <property name="visible">True</property>
-                        <property name="n_rows">3</property>
+                        <property name="n_rows">4</property>
                         <property name="n_columns">4</property>
                         <property name="homogeneous">False</property>
                         <property name="row_spacing">2</property>
@@ -409,7 +417,7 @@
                             <property name="right_attach">3</property>
                             <property name="top_attach">2</property>
                             <property name="bottom_attach">3</property>
-                            <property name="y_padding">10</property>
+                            <property name="y_padding">0</property>
                             <property name="x_options">fill</property>
                             <property name="y_options"/>
                           </packing>
@@ -567,6 +575,97 @@
                             <property name="y_options"/>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkSpinButton" id="pwd_spinbutton">
+                            <property name="visible">True</property>
+                            <property name="tooltip-text" translatable="yes">How long the unlock dialog waits for input before disappearing.</property>
+                            <property name="can_focus">True</property>
+                            <property name="climb_rate">15</property>
+                            <property name="digits">0</property>
+                            <property name="numeric">True</property>
+                            <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                            <property name="snap_to_ticks">True</property>
+                            <property name="wrap">False</property>
+                            <property name="adjustment">adjustment8</property>
+                            <accessibility>
+                              <relation target="pwd_button" type="controlled-by"/>
+                              <relation target="pwd_button" type="labelled-by"/>
+                              <relation target="pwd_mlabel" type="labelled-by"/>
+                            </accessibility>
+                            <signal handler="pref_changed_cb" name="activate"/>
+                            <signal handler="pref_changed_event_cb" name="focus_out_event"/>
+                            <signal handler="pref_changed_cb" name="value_changed"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                            <property name="x_options">fill</property>
+                            <property name="y_options"/>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEventBox" id="pwd_button_eventbox">
+                            <property name="visible">True</property>
+                            <property name="tooltip-text" translatable="yes">Whether the unlock dialog box should disappear after a timeout.</property>
+                            <property name="visible_window">True</property>
+                            <property name="above_child">False</property>
+                            <child>
+                              <object class="GtkCheckButton" id="pwd_button">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Timeout _Unlock After</property>
+                                <property name="use_underline">True</property>
+                                <property name="relief">GTK_RELIEF_NORMAL</property>
+                                <property name="focus_on_click">True</property>
+                                <property name="active">False</property>
+                                <property name="inconsistent">False</property>
+                                <property name="draw_indicator">True</property>
+                                <accessibility>
+                                  <relation target="pwd_spinbutton" type="controller-for"/>
+                                  <relation target="pwd_spinbutton" type="label-for"/>
+                                  <relation target="pwd_spinbutton" type="flows-to"/>
+                                </accessibility>
+                                <signal handler="pref_changed_cb" name="toggled"/>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                            <property name="x_options">fill</property>
+                            <property name="y_options"/>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="pwd_mlabel">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">minutes</property>
+                            <property name="use_underline">False</property>
+                            <property name="use_markup">False</property>
+                            <property name="justify">GTK_JUSTIFY_LEFT</property>
+                            <property name="wrap">False</property>
+                            <property name="selectable">False</property>
+                            <property name="xalign">0</property>
+                            <property name="yalign">0.5</property>
+                            <property name="xpad">8</property>
+                            <property name="ypad">0</property>
+                            <accessibility>
+                              <relation target="pwd_spinbutton" type="label-for"/>
+                              <relation target="pwd_spinbutton" type="flows-from"/>
+                            </accessibility>
+                          </object>
+                          <packing>
+                            <property name="left_attach">3</property>
+                            <property name="right_attach">4</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                            <property name="y_options"/>
+                          </packing>
+                        </child>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
--
2.7.4
components/desktop/xscreensaver/patches/xscreensaver-26-keyboard-indicator.patch
@@ -1,5 +1,5 @@
--- driver/lock-Gtk.c.~5~    2017-04-27 21:23:36.284040048 +0300
+++ driver/lock-Gtk.c    2017-04-27 21:24:01.766618624 +0300
--- driver/lock-Gtk.c.~5~    2017-07-25 18:12:10.395545202 +0000
+++ driver/lock-Gtk.c    2017-07-25 18:12:10.411672752 +0000
@@ -61,9 +61,11 @@
 #include <ctype.h>
 #include <X11/Xos.h>
@@ -11,8 +11,8 @@
+#include <X11/extensions/XKBrules.h>
 
 #include <gconf/gconf-client.h>
 #include <libbonobo.h>
@@ -90,6 +92,7 @@
 #include <atk/atkobject.h>
@@ -88,6 +90,7 @@
   GtkWidget *button;
   GtkWidget *msg_label;
   GtkWidget *pam_message_label;
@@ -20,7 +20,7 @@
 } PasswdDialog;
 
 /*Global info */
@@ -100,6 +103,55 @@
@@ -98,6 +101,55 @@
 
 #define FD_TO_PARENT  9
 
@@ -76,7 +76,7 @@
 /* Send a command to the xscreensaver parent daemon
    Arguments:
     - msg - type of message - "input", "raise_wid", etc.
@@ -179,7 +231,7 @@
@@ -177,7 +229,7 @@
   GtkWidget *entry;
   AtkObject *atk_entry;
   GtkWidget *title_label, *msg_label, *prompt_label,
@@ -85,7 +85,7 @@
   AtkObject *atk_title_label, *atk_prompt_label;
   GtkWidget *button;
   GtkWidget *image;
@@ -274,7 +326,7 @@
@@ -272,7 +324,7 @@
             _("Percent of time you have left to unlock the screen."));
 
   /* text fields */
@@ -94,7 +94,7 @@
   gtk_box_pack_start (GTK_BOX (hbox1), vbox2,
                       TRUE, TRUE, 0);
   /* AT role =filler */
@@ -368,6 +420,27 @@
@@ -366,6 +418,27 @@
 
   gtk_box_pack_start (GTK_BOX (vbox2), pam_msg_label, FALSE, FALSE, 0);
 
@@ -122,7 +122,7 @@
   /* date string */
   tm = localtime (&now);
   memset (buf, 0, sizeof (buf));
@@ -464,6 +537,53 @@
@@ -462,6 +535,53 @@
 }
 
 static GdkFilterReturn
@@ -176,7 +176,7 @@
 dialog_filter_func (GdkXEvent *xevent, GdkEvent *gevent, gpointer data)
 {
   PasswdDialog *pwd = data;
@@ -716,6 +836,16 @@
@@ -709,6 +829,16 @@
     request_atoms (dpy, atom_lists);
   }
 
@@ -193,7 +193,7 @@
   /* bugid 6346056(P1):
      ATOK pallet sometimes appears in screensave/lock-screen mode
   */
@@ -773,6 +903,7 @@
@@ -740,6 +870,7 @@
 
   gdk_display_sync (gtk_widget_get_display (pwd->dialog));
 
components/desktop/xscreensaver/xscreensaver.p5m
@@ -61,7 +61,7 @@
file path=usr/lib/xscreensaver/config/screensaver-locking.png
file path=usr/lib/xscreensaver/config/screensaver-power.png
file path=usr/lib/xscreensaver/config/screensaver-snap.png
file path=usr/lib/xscreensaver/config/xscreensaver-demo.glade2
file path=usr/lib/xscreensaver/config/xscreensaver-demo.ui
file path=usr/share/X11/app-defaults/XScreenSaver
file path=usr/share/applications/xscreensaver-properties.desktop
file path=usr/share/locale/ca/LC_MESSAGES/xscreensaver.mo