Hello community, here is the log from the commit of package cinnamon-screensaver for openSUSE:Factory checked in at 2016-11-18 22:03:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cinnamon-screensaver (Old) and /work/SRC/openSUSE:Factory/.cinnamon-screensaver.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cinnamon-screensaver" Changes: -------- --- /work/SRC/openSUSE:Factory/cinnamon-screensaver/cinnamon-screensaver.changes 2016-11-15 18:01:09.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.cinnamon-screensaver.new/cinnamon-screensaver.changes 2016-11-18 22:03:54.000000000 +0100 @@ -1,0 +2,28 @@ +Thu Nov 17 21:14:00 UTC 2016 - sor.ale...@meowr.ru + +- Update to version 3.2.3: + * Declare GdkX11. + * events: For GTK+ < 3.18, skip the fade out animation, and + immediately destroy the window. Move the deactivate command + into an idle callback, so we're not attempting to destroy the + window while in the middle of processing a motion event. + * passwordEntry.py: Emulate Gtk.Entry.grab_focus_without_selecting(). + The real call was recently removed, as it doesn't exist in + Gtk 3.14, however the behaviour is still necessary - tabbing + between buttons and entry will cause the entire partial + password to be selected, causing overwrite. This restores the + original functionality without requiring Gtk 3.18+. + * Add a Gtk 3.14 fallback stylesheet (it's almost exactly the + same as Gtk 3.18 currently). + * Handle clock/albumart padding in the GtkOverlay position code - + it seems not to include this in its preferred-size calculations. + * Invert the scroll direction for the volume slider. + * panels: Remove separators. Tweak spacing for keyboard layout + icon in the Gtk 3.18 CSS file. + * utils.py: Clean up get_user_name() calls. + * Disable locking if pam files aren't found or if we're running + as root. + * utils.py: Add 'liveuser' group check to user_can_lock() + function. + +------------------------------------------------------------------- Old: ---- cinnamon-screensaver-3.2.2.tar.gz New: ---- cinnamon-screensaver-3.2.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cinnamon-screensaver.spec ++++++ --- /var/tmp/diff_new_pack.X8UQjg/_old 2016-11-18 22:03:55.000000000 +0100 +++ /var/tmp/diff_new_pack.X8UQjg/_new 2016-11-18 22:03:55.000000000 +0100 @@ -17,7 +17,7 @@ Name: cinnamon-screensaver -Version: 3.2.2 +Version: 3.2.3 Release: 0 Summary: Cinnamon screensaver and locker License: GPL-2.0+ ++++++ cinnamon-screensaver-3.2.2.tar.gz -> cinnamon-screensaver-3.2.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/configure.ac new/cinnamon-screensaver-3.2.3/configure.ac --- old/cinnamon-screensaver-3.2.2/configure.ac 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/configure.ac 2016-11-17 10:50:34.000000000 +0100 @@ -2,7 +2,7 @@ AC_PREREQ(2.60) AC_INIT([cinnamon-screensaver], - [3.2.2], + [3.2.3], [https://github.com/linuxmint/cinnamon-screensaver/issues]) PKG_PROG_PKG_CONFIG([0.26]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/debian/changelog new/cinnamon-screensaver-3.2.3/debian/changelog --- old/cinnamon-screensaver-3.2.2/debian/changelog 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/debian/changelog 2016-11-17 10:50:34.000000000 +0100 @@ -1,3 +1,19 @@ +cinnamon-screensaver (3.2.3) serena; urgency=medium + + [ Willy Sudiarto Raharjo ] + * Declare GdkX11. + + [ Michael Webster ] + * events: For gtk < 3.18, skip the fade out animation, and immediately destroy the window. Move the deactivate command into an idle callback, so we're not attempting to destroy the window while in the middle of processing a motion event. + * passwordEntry.py: emulate Gtk.Entry.grab_focus_without_selecting() - the real call was recently removed, as it doesn't exist in Gtk 3.14, however the behavior is still necessary - tabbing between buttons and entry will cause the entire partial password to be selected, causing overwrite. This restores the original functionality without requiring gtk 3.18+ + * Fixes for Betsy/Jessie: + * panels: Remove separators. Tweak spacing for keyboard layout icon in the gtk 3.18 css file. + * utils.py: clean up get_user_name() calls. + * Disable locking if pam files aren't found or if we're running as root. + * utils.py: add 'liveuser' group check to user_can_lock() function. + + -- Clement Lefebvre <r...@linuxmint.com> Thu, 17 Nov 2016 09:49:37 +0000 + cinnamon-screensaver (3.2.2) serena; urgency=medium * pkg: Added missing dep on python3-gi-cairo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/libcscreensaver/Makefile.am new/cinnamon-screensaver-3.2.3/libcscreensaver/Makefile.am --- old/cinnamon-screensaver-3.2.2/libcscreensaver/Makefile.am 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/libcscreensaver/Makefile.am 2016-11-17 10:50:34.000000000 +0100 @@ -134,6 +134,8 @@ libcscreensaver_la_gir_sources = \ cs-gdk-event-filter.c \ cs-gdk-event-filter.h \ + cs-init-utils.c \ + cs-init-utils.h \ cs-notification-watcher.c \ cs-notification-watcher.h \ $(dbus_built_sources) \ @@ -141,6 +143,8 @@ libcscreensaver_la_SOURCES = \ $(libcscreensaver_la_gir_sources) \ + setuid.c \ + setuid.h \ $(NULL) libcscreensaver_la_LIBADD = \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/libcscreensaver/cs-init-utils.c new/cinnamon-screensaver-3.2.3/libcscreensaver/cs-init-utils.c --- old/cinnamon-screensaver-3.2.2/libcscreensaver/cs-init-utils.c 1970-01-01 01:00:00.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/libcscreensaver/cs-init-utils.c 2016-11-17 10:50:34.000000000 +0100 @@ -0,0 +1,94 @@ +#include <config.h> + +#include "setuid.h" +#include <glib/gstdio.h> +#include <fcntl.h> +#include <stdio.h> +#include <string.h> +#include <sys/types.h> + +#include "cs-init-utils.h" + +/* + * Portions: + * Copyright (c) 1991-2004 Jamie Zawinski <j...@jwz.org> + * Copyright (c) 2005 William Jon McCann <mcc...@jhu.edu> + */ + +#define PAM_SERVICE_NAME "cinnamon-desktop" + +/* from gs-auth-pam.c */ +static gboolean +pam_check (void) +{ + gboolean ret = TRUE; + + const char dir [] = "/etc/pam.d"; + const char file [] = "/etc/pam.d/" PAM_SERVICE_NAME; + const char file2 [] = "/etc/pam.conf"; + struct stat st; + + if (g_stat (dir, &st) == 0 && st.st_mode & S_IFDIR) { + if (g_stat (file, &st) != 0) { + g_warning ("%s does not exist.\n" + "Authentication via PAM is unlikely to work.", + file); + ret = FALSE; + } + } else if (g_stat (file2, &st) == 0) { + FILE *f = g_fopen (file2, "r"); + if (f) { + gboolean ok = FALSE; + char buf[255]; + while (fgets (buf, sizeof(buf), f)) { + if (strstr (buf, PAM_SERVICE_NAME)) { + ok = TRUE; + break; + } + } + + fclose (f); + if (!ok) { + g_warning ("%s does not list the `%s' service.\n" + "Authentication via PAM is unlikely to work.", + file2, PAM_SERVICE_NAME); + ret = FALSE; + } + } + /* else warn about file2 existing but being unreadable? */ + } else { + g_warning ("Neither %s nor %s exist.\n" + "Authentication via PAM is unlikely to work.", + file2, file); + ret = FALSE; + } + + return ret; +} + +gboolean +cs_init_utils_initialize_locking (gboolean debug) +{ + gboolean ret; + char *nolock_reason; + char *orig_uid; + char *uid_message; + + ret = pam_check () && hack_uid (&nolock_reason, + &orig_uid, + &uid_message); + + if (nolock_reason) { + g_print ("Locking disabled: %s\n", nolock_reason); + } + + if (uid_message && debug) { + g_print ("Modified UID: %s\n", uid_message); + } + + g_free (nolock_reason); + g_free (orig_uid); + g_free (uid_message); + + return ret; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/libcscreensaver/cs-init-utils.h new/cinnamon-screensaver-3.2.3/libcscreensaver/cs-init-utils.h --- old/cinnamon-screensaver-3.2.2/libcscreensaver/cs-init-utils.h 1970-01-01 01:00:00.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/libcscreensaver/cs-init-utils.h 2016-11-17 10:50:34.000000000 +0100 @@ -0,0 +1,13 @@ +#ifndef CS_INIT_UTILS_H +#define CS_INIT_UTILS_H + +#include <glib.h> + +G_BEGIN_DECLS + +gboolean cs_init_utils_initialize_locking (gboolean debug); + +G_END_DECLS + +#endif /* CS_INIT_UTILS_H */ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/libcscreensaver/setuid.c new/cinnamon-screensaver-3.2.3/libcscreensaver/setuid.c --- old/cinnamon-screensaver-3.2.2/libcscreensaver/setuid.c 1970-01-01 01:00:00.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/libcscreensaver/setuid.c 2016-11-17 10:50:34.000000000 +0100 @@ -0,0 +1,245 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * setuid.c --- management of runtime privileges. + * + * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <j...@jwz.org> + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. No representations are made about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + */ + +#include "config.h" + +#include <errno.h> + +#include <stdio.h> +#include <string.h> +#include <sys/types.h> +#include <unistd.h> +#include <pwd.h> /* for getpwnam() and struct passwd */ +#include <grp.h> /* for getgrgid() and struct group */ + +#include "setuid.h" + +static char * +uid_gid_string (uid_t uid, + gid_t gid) +{ + static char *buf; + struct passwd *p = NULL; + struct group *g = NULL; + + p = getpwuid (uid); + g = getgrgid (gid); + + buf = g_strdup_printf ("%s/%s (%ld/%ld)", + (p && p->pw_name ? p->pw_name : "???"), + (g && g->gr_name ? g->gr_name : "???"), + (long) uid, (long) gid); + + return buf; +} + +static gboolean +set_ids_by_number (uid_t uid, + gid_t gid, + char **message_ret) +{ + int uid_errno = 0; + int gid_errno = 0; + int sgs_errno = 0; + struct passwd *p = getpwuid (uid); + struct group *g = getgrgid (gid); + + if (message_ret) + *message_ret = NULL; + + /* Rumor has it that some implementations of of setuid() do nothing + when called with -1; therefore, if the "nobody" user has a uid of + -1, then that would be Really Bad. Rumor further has it that such + systems really ought to be using -2 for "nobody", since that works. + So, if we get a uid (or gid, for good measure) of -1, switch to -2 + instead. Note that this must be done after we've looked up the + user/group names with getpwuid(-1) and/or getgrgid(-1). + */ + if (gid == (gid_t) -1) gid = (gid_t) -2; + if (uid == (uid_t) -1) uid = (uid_t) -2; + + errno = 0; + if (setgroups (1, &gid) < 0) + sgs_errno = errno ? errno : -1; + + errno = 0; + if (setgid (gid) != 0) + gid_errno = errno ? errno : -1; + + errno = 0; + if (setuid (uid) != 0) + uid_errno = errno ? errno : -1; + + if (uid_errno == 0 && gid_errno == 0 && sgs_errno == 0) { + static char *reason; + reason = g_strdup_printf ("changed uid/gid to %s/%s (%ld/%ld).", + (p && p->pw_name ? p->pw_name : "???"), + (g && g->gr_name ? g->gr_name : "???"), + (long) uid, (long) gid); + if (message_ret) + *message_ret = g_strdup (reason); + + g_free (reason); + + return TRUE; + } else { + char *reason = NULL; + + if (sgs_errno) { + reason = g_strdup_printf ("couldn't setgroups to %s (%ld)", + (g && g->gr_name ? g->gr_name : "???"), + (long) gid); + if (sgs_errno == -1) + fprintf (stderr, "%s: unknown error\n", reason); + else { + errno = sgs_errno; + perror (reason); + } + g_free (reason); + reason = NULL; + } + + if (gid_errno) { + reason = g_strdup_printf ("couldn't set gid to %s (%ld)", + (g && g->gr_name ? g->gr_name : "???"), + (long) gid); + if (gid_errno == -1) + fprintf (stderr, "%s: unknown error\n", reason); + else { + errno = gid_errno; + perror (reason); + } + g_free (reason); + reason = NULL; + } + + if (uid_errno) { + reason = g_strdup_printf ("couldn't set uid to %s (%ld)", + (p && p->pw_name ? p->pw_name : "???"), + (long) uid); + if (uid_errno == -1) + fprintf (stderr, "%s: unknown error\n", reason); + else { + errno = uid_errno; + perror (reason); + } + g_free (reason); + reason = NULL; + } + return FALSE; + } + return FALSE; +} + + +/* If we've been run as setuid or setgid to someone else (most likely root) + turn off the extra permissions so that random user-specified programs + don't get special privileges. (On some systems it is necessary to install + this program as setuid root in order to read the passwd file to implement + lock-mode.) + + *** WARNING: DO NOT DISABLE ANY OF THE FOLLOWING CODE! + If you do so, you will open a security hole. See the sections + of the xscreensaver manual titled "LOCKING AND ROOT LOGINS", + and "USING XDM". +*/ + +/* Returns TRUE if OK to lock, FALSE otherwise */ +gboolean +hack_uid (char **nolock_reason, + char **orig_uid, + char **uid_message) +{ + char *reason; + gboolean ret; + + ret = TRUE; + reason = NULL; + + if (nolock_reason != NULL) { + *nolock_reason = NULL; + } + if (orig_uid != NULL) { + *orig_uid = NULL; + } + if (uid_message != NULL) { + *uid_message = NULL; + } + + /* Discard privileges, and set the effective user/group ids to the + real user/group ids. That is, give up our "chmod +s" rights. + */ + { + uid_t euid = geteuid (); + gid_t egid = getegid (); + uid_t uid = getuid (); + gid_t gid = getgid (); + + if (orig_uid != NULL) { + *orig_uid = uid_gid_string (euid, egid); + } + +#ifdef HAVE_BSDAUTH /* we need to setgid auth to run the bsd_auth(3) login_* helpers */ + { + struct group *authg = getgrnam("auth"); + if (!authg || !authg->gr_name || !*authg->gr_name) { + reason = g_strdup ("no such group as \"auth\" for bsdauth."); + + ret = FALSE; + goto out; + } + if (! set_ids_by_number (uid, authg->gr_gid, uid_message)) { + reason = g_strdup ("cannot setgid \"auth\" for bsdauth."); + + ret = FALSE; + goto out; + } + } +#else /* !HAVE_BSDAUTH */ + if (uid != euid || gid != egid) { + if (! set_ids_by_number (uid, gid, uid_message)) { + reason = g_strdup ("unable to discard privileges."); + + ret = FALSE; + goto out; + } + } +#endif + } + + + /* Locking can't work when running as root, because we have no way of + knowing what the user id of the logged in user is (so we don't know + whose password to prompt for.) + + *** WARNING: DO NOT DISABLE THIS CODE! + If you do so, you will open a security hole. See the sections + of the xscreensaver manual titled "LOCKING AND ROOT LOGINS", + and "USING XDM". + */ + if (getuid () == (uid_t) 0) { + reason = g_strdup ("running as root"); + ret = FALSE; + goto out; + } + + out: + if (nolock_reason != NULL) { + *nolock_reason = g_strdup (reason); + } + g_free (reason); + + return ret; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/libcscreensaver/setuid.h new/cinnamon-screensaver-3.2.3/libcscreensaver/setuid.h --- old/cinnamon-screensaver-3.2.2/libcscreensaver/setuid.h 1970-01-01 01:00:00.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/libcscreensaver/setuid.h 2016-11-17 10:50:34.000000000 +0100 @@ -0,0 +1,27 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * xscreensaver, Copyright (c) 1993-2004 Jamie Zawinski <j...@jwz.org> + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. No representations are made about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + */ + +#ifndef __GS_SETUID_H +#define __GS_SETUID_H + +#include <glib.h> + +G_BEGIN_DECLS + +gboolean hack_uid (char **nolock_reason, + char **orig_uid, + char **uid_message); + +G_END_DECLS + +#endif /* __GS_SETUID_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/Makefile.am new/cinnamon-screensaver-3.2.3/src/Makefile.am --- old/cinnamon-screensaver-3.2.2/src/Makefile.am 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/Makefile.am 2016-11-17 10:50:34.000000000 +0100 @@ -29,7 +29,8 @@ volumeControl.py \ $(NULL) -app_DATA = cinnamon-screensaver-gtk3.18.css \ +app_DATA = cinnamon-screensaver-gtk3.14.css \ + cinnamon-screensaver-gtk3.18.css \ cinnamon-screensaver-gtk3.20.css \ $(NULL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/cinnamon-screensaver-gtk3.14.css new/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.14.css --- old/cinnamon-screensaver-3.2.2/src/cinnamon-screensaver-gtk3.14.css 1970-01-01 01:00:00.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.14.css 2016-11-17 10:50:34.000000000 +0100 @@ -0,0 +1,231 @@ +.csstage { + background-image: none; + background-color: black; +} + +.csstage .unlockbox { + color: #eeeeee; + font-size: 20px; + text-shadow: 1px 1px alpha(black, 0.8); +} + +.csstage .clock { + padding: 100px 200px 100px 200px; + color: #eeeeee; + text-shadow: 1px 1px alpha(black, 0.8); +} + +.csstage .albumart { + padding: 100px 200px 100px 200px; +} + +.csstage .albumart .framedimage { + border-radius: 2px; + border: 2px solid; + border-color: #eeeeee; + box-shadow: 1px 1px alpha(black, 0.8); + /* substitute for min-height - replace with min-height in Gtk 3.20+*/ + color: rgba(250, 0, 0, 0); +} + +.csstage .toppanel { + border-color: alpha(white, .2); + border-style: solid; + color: white; + background-color: transparent; + background-image: linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)); +} + +.csstage .audiopanel { + border-width: 0 1px 1px 0; + border-radius: 0 0 3px 0; + background-color: rgba(255, 255, 255, .05); +} + +.csstage .infopanel { + border-width: 0 0 1px 1px; + border-radius: 0 0 0 3px; + background-color: rgba(255, 255, 255, .05); +} + +.csstage .notificationwidget, +.csstage .powerwidget { + font-size: 12px; + font-weight: bold; + color: white; + background-color: transparent; + background-image: none; + text-shadow: 1px 1px alpha(black, 0.8); + padding: 6px; +} + +.csstage .auth-message { + font-size: 12px; + color: red; +} + +.csstage .caps-message { + font-size: 12px; + color: orange; +} + +.csstage .framedimage { + background-color: alpha(grey, .25); + background-clip: border-box; + box-shadow: 1px 1px alpha(black, 0.8); +} + +.csstage .faceimage { + border-radius: 4px; + border: 4px solid; + border-color: @theme_selected_bg_color; + /* substitute for min-height - replace with min-height in Gtk 3.20+*/ + color: rgba(150, 0, 0, 0); +} + +.csstage .albumart { + color: rgba(300, 0, 0, 0); +} + +.csstage .passwordentry { + font-size: 12px; + box-shadow: none; + border-color: alpha(white, .2); + border-style: solid; + color: white; + background-image: none; + background-color: transparent; + border-width: 1px; + padding: 5px 10px 5px 5px; +} + +.csstage .passwordentry:focused { + background-color: transparent; + background-image: none; + border-color: @theme_selected_bg_color; + box-shadow: 1px 1px alpha(white, 0.1); +} + +/* Use :backdrop for alt-text keyboard layout */ +.csstage .passwordentry:backdrop { + font-family: monospace; + font-size: 16px; + color: @theme_selected_bg_color; +} + +.csstage .passwordentry.progressbar { + margin: 2px; + padding: 0; + border-radius: 0; + border-width: 0 0 2px; + border-color: alpha(@theme_selected_bg_color, .7); +} + +.csstage .passwordentry.progressbar:focused { + background-color: transparent; +} + +.csstage .passwordentry.image.left { + padding: 0 15px 0 0; +} + +.csstage .transparentbutton { + -gtk-icon-style: requested; + border-color: alpha(white, .2); + border-image: none; + box-shadow: none; + background-image: none; + background-color: transparent; + border-radius: 20px; + outline-radius: 20px; + outline-color: transparent; + color: alpha(white, .7); + border-width: 1px; + padding: 4px; +} + +.csstage .transparentbutton image { + color: alpha(white, .7); +} + +.csstage .transparentbutton:insensitive { + color: #333333; +} + +.csstage .transparentbutton:focused { + background-color: alpha(grey, .3); + border-color: @theme_selected_bg_color; + box-shadow: 1px 1px alpha(white, 0.1); +} + +.csstage .transparentbutton:prelight { + border-color: alpha(white, .2); + background-color: alpha(grey, .2); + box-shadow: 1px 1px alpha(white, 0.1); +} + +.csstage .transparentbutton:prelight:focused { + border-color: @theme_selected_bg_color; + background-color: alpha(grey, .4); + box-shadow: 1px 1px alpha(white, 0.1); +} + +.csstage .transparentbutton:active { + border-color: @theme_selected_bg_color; + background-color: alpha(grey, .6); + box-shadow: 1px 1px alpha(white, 0.1); +} + +.csstage .transparentbutton:active:focused { + border-color: @theme_selected_bg_color; + background-color: alpha(grey, .9); + box-shadow: 1px 1px alpha(white, 0.1); +} + +.csstage .volumeslider { + -GtkScale-slider-length: 4; + -GtkRange-slider-width: 30; + background-color: rgba(255, 255, 255, .1); + color: @theme_selected_bg_color; + padding: 3px 0px 3px 0px; +} + +.csstage .volumeslider:insensitive { + background-color: alpha(white, .5); +} + +.csstage .positionlabel { + font-family: monospace; + font-size: 10px; + text-shadow: 1px 1px alpha(black, 0.8); + background-image: none; + background-color: transparent; +} + +.csstage .trackname { + font-family: monospace; + font-size: 12px; + text-shadow: 1px 1px alpha(black, 0.8); + background-image: none; + background-color: transparent; +} + +.csstage .albumartist { + font-family: monospace; + font-size: 8px; + text-shadow: 1px 1px alpha(black, 0.8); + background-image: none; + background-color: transparent; +} + +.csstage .positionbar { + -GtkProgressBar-min-horizontal-bar-height: 14; + -GtkProgressBar-min-horizontal-bar-width: 180; + background-color: rgba(255, 255, 255, .1); + color: @theme_selected_bg_color; +} + +.csstage GtkViewport { + background-color: transparent; + background-image: none; +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/cinnamon-screensaver-gtk3.18.css new/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.18.css --- old/cinnamon-screensaver-3.2.2/src/cinnamon-screensaver-gtk3.18.css 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.18.css 2016-11-17 10:50:34.000000000 +0100 @@ -126,7 +126,7 @@ } .csstage .passwordentry.image.left { - padding: 0 15px 0 5px; + padding: 0 15px 0 0; } .csstage .transparentbutton { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/cinnamon-screensaver-main.py new/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-main.py --- old/cinnamon-screensaver-3.2.2/src/cinnamon-screensaver-main.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-main.py 2016-11-17 10:50:34.000000000 +0100 @@ -2,14 +2,17 @@ import gi gi.require_version('Gtk', '3.0') +gi.require_version('GdkX11', '3.0') +gi.require_version('CScreensaver', '1.0') -from gi.repository import Gtk, Gdk +from gi.repository import Gtk, Gdk, CScreensaver import signal import gettext import argparse import os import config +import status from util import utils from service import ScreensaverService @@ -25,6 +28,10 @@ """ def __init__(self): parser = argparse.ArgumentParser(description='Cinnamon Screensaver') + parser.add_argument('--debug', dest='debug', action='store_true', + help='Print out some extra debugging info') + parser.add_argument('--disable-locking', dest='lock_disabled', action='store_true', + help='Disable the lock screen') parser.add_argument('--version', dest='version', action='store_true', help='Display the current version') parser.add_argument('--no-daemon', dest='no_daemon', action='store_true', @@ -35,6 +42,11 @@ print("cinnamon-screensaver %s" % (config.VERSION)) quit() + status.LockEnabled = CScreensaver.init_utils_initialize_locking(args.debug) and not args.lock_disabled + + if args.lock_disabled: + print("Locking disabled") + Gtk.icon_size_register("audio-button", 20, 20) Gtk.Settings.get_default().connect("notify::gtk-theme-name", self.on_theme_changed) @@ -65,10 +77,12 @@ if ".csstage" not in css: print("Cinnamon Screensaver support not found in current theme - adding some...") - if utils.have_gtk_3_20(): + if utils.have_gtk_version("3.20.0"): path = os.path.join(config.pkgdatadir, "cinnamon-screensaver-gtk3.20.css") - else: + elif utils.have_gtk_version("3.18.0"): path = os.path.join(config.pkgdatadir, "cinnamon-screensaver-gtk3.18.css") + else: + path = os.path.join(config.pkgdatadir, "cinnamon-screensaver-gtk3.14.css") f = open(path, 'r') fallback_css = f.read() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/infoPanel.py new/cinnamon-screensaver-3.2.3/src/infoPanel.py --- old/cinnamon-screensaver-3.2.2/src/infoPanel.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/infoPanel.py 2016-11-17 10:50:34.000000000 +0100 @@ -45,10 +45,6 @@ hbox.pack_start(self.notification_widget, True, True, 2) self.notification_widget.connect("notification", self.on_notification_received) - self.separator = Gtk.VSeparator() - self.separator.set_no_show_all(True) - hbox.pack_start(self.separator, True, True, 2) - self.power_widget = PowerWidget() self.power_widget.set_no_show_all(True) hbox.pack_start(self.power_widget, True, True, 2) @@ -74,7 +70,6 @@ self.show_power = self.power_widget.should_show() self.show_notifications = self.notification_widget.should_show() - show_separator = self.show_power and self.show_notifications # Determine if we want to show all the time or only when status.Awake @@ -89,7 +84,6 @@ if do_reveal: self.power_widget.set_visible(self.show_power) self.notification_widget.set_visible(self.show_notifications) - self.separator.set_visible(show_separator) self.reveal() else: self.unreveal() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/manager.py new/cinnamon-screensaver-3.2.3/src/manager.py --- old/cinnamon-screensaver-3.2.2/src/manager.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/manager.py 2016-11-17 10:50:34.000000000 +0100 @@ -104,6 +104,7 @@ else: if self.stage: self.despawn_stage(c.STAGE_DESPAWN_TRANSITION, self.on_despawn_stage_complete) + status.focusWidgets = [] self.grab_helper.release() return True return False @@ -146,10 +147,13 @@ if status.Locked: self.stage.raise_unlock_widget() self.grab_helper.release_mouse() + self.stage.maybe_update_layout() else: - self.set_active(False) + GObject.idle_add(self.idle_deactivate) - self.stage.maybe_update_layout() + def idle_deactivate(self): + self.set_active(False) + return False def spawn_stage(self, away_message, effect_time=c.STAGE_SPAWN_TRANSITION, callback=None): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/passwordEntry.py new/cinnamon-screensaver-3.2.3/src/passwordEntry.py --- old/cinnamon-screensaver-3.2.2/src/passwordEntry.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/passwordEntry.py 2016-11-17 10:50:34.000000000 +0100 @@ -212,3 +212,8 @@ self.keyboard_controller.set_current_group(self.original_group) + def grab_focus(self): + Gtk.Widget.grab_focus(self) + + length = self.get_buffer().get_length() + self.select_region(length, -1) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/playerControl.py new/cinnamon-screensaver-3.2.3/src/playerControl.py --- old/cinnamon-screensaver-3.2.2/src/playerControl.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/playerControl.py 2016-11-17 10:50:34.000000000 +0100 @@ -37,8 +37,6 @@ # Player buttons - self.pack_start(Gtk.VSeparator(), True, True, 2) - button_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) button_box.set_homogeneous(True) vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) @@ -76,8 +74,6 @@ # Position labels and bar - self.pack_start(Gtk.VSeparator(), True, True, 2) - vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.pack_start(vbox, True, True, 4) @@ -99,8 +95,6 @@ # Track info - self.pack_start(Gtk.VSeparator(), True, True, 2) - vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.pack_start(vbox, True, True, 6) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/stage.py new/cinnamon-screensaver-3.2.3/src/stage.py --- old/cinnamon-screensaver-3.2.2/src/stage.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/stage.py 2016-11-17 10:50:34.000000000 +0100 @@ -138,7 +138,11 @@ self.fader.cancel() - self.fader.fade_out(effect_time, callback) + if utils.have_gtk_version("3.18.0"): + self.fader.fade_out(effect_time, callback) + else: + self.hide() + callback() def on_realized(self, widget): """ @@ -726,6 +730,20 @@ elif valign == Gtk.Align.END: allocation.y = monitor_rect.y + monitor_rect.height - nat_rect.height + # Earlier gtk versions don't appear to include css padding in their preferred-size calculation + # This is true at least in 3.14 (Betsy/Jessir - is 3.16 relevant anywhere?) + if not utils.have_gtk_version("3.18.0"): + padding = child.get_style_context().get_padding(Gtk.StateFlags.NORMAL) + if halign == Gtk.Align.START: + allocation.x += padding.left + elif halign == Gtk.Align.END: + allocation.x -= padding.right + + if valign == Gtk.Align.START: + allocation.y += padding.top + elif valign == Gtk.Align.END: + allocation.y -= padding.bottom + return True if isinstance(child, AudioPanel): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/status.py new/cinnamon-screensaver-3.2.3/src/status.py --- old/cinnamon-screensaver-3.2.2/src/status.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/status.py 2016-11-17 10:50:34.000000000 +0100 @@ -6,8 +6,14 @@ Awake = False # Whether the unlock dialog is visible or not. # A list of focusable widgets that the user can tab between in the unlock screen. See FocusNavigator. -focusChain = [] +focusWidgets = [] # This helps the Stage decide whether to show the clock widget or not while not Awake. # You get all sorts of artifacts trying to draw widgets over the x plugins PluginRunning = False + +# Set at startup, assisted by cs_init_utils_initialize_locking() +# This is different than the preference that turns off locking - that only prevents idle locking. The +# user can still lock explicitly. The function checks for the existence of correct PAM files, +# as well as adjusting the UID if this process is started as root. +LockEnabled = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/util/eventHandler.py new/cinnamon-screensaver-3.2.3/src/util/eventHandler.py --- old/cinnamon-screensaver-3.2.2/src/util/eventHandler.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/util/eventHandler.py 2016-11-17 10:50:34.000000000 +0100 @@ -38,19 +38,19 @@ """ if status.Awake: self.on_user_activity() - return Gdk.EVENT_STOP + return Gdk.EVENT_PROPAGATE if self.last_x == -1 or self.last_y == -1: self.last_x = event.x self.last_y = event.y - return Gdk.EVENT_STOP + return Gdk.EVENT_PROPAGATE distance = max(abs(self.last_x - event.x), abs(self.last_y - event.y)) if distance > MOTION_THRESHOLD: self.on_user_activity() - return Gdk.EVENT_STOP + return Gdk.EVENT_PROPAGATE def on_button_press_event(self, event): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/util/utils.py new/cinnamon-screensaver-3.2.3/src/util/utils.py --- old/cinnamon-screensaver-3.2.2/src/util/utils.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/util/utils.py 2016-11-17 10:50:34.000000000 +0100 @@ -6,6 +6,7 @@ import subprocess import config +import status # Various utility functions that are used in multiple places. @@ -20,11 +21,8 @@ return ret -def get_user_display_name(): - name = GLib.get_real_name() - - if not name or name == "Unknown": - name = GLib.get_user_name() +def get_user_name(): + name = GLib.get_user_name() utf8_name = None @@ -33,8 +31,11 @@ return utf8_name -def get_user_name(): - name = GLib.get_user_name() +def get_user_display_name(): + name = GLib.get_real_name() + + if not name or name == "Unknown": + name = get_user_name() utf8_name = None @@ -54,7 +55,10 @@ return utf8_name def user_can_lock(): - name = GLib.get_user_name() + if not status.LockEnabled: + return False + + name = get_user_name() # KeyError is generated if group doesn't exist, ignore it and allow lock try: @@ -64,6 +68,13 @@ except KeyError: pass + try: + group = grp.getgrnam("liveuser") + if name in group.gr_mem: + return False + except KeyError: + pass + return True def process_is_running(name): @@ -156,8 +167,12 @@ def CLAMP(value, low, high): return max(low, min(value, high)) -def have_gtk_3_20(): - return Gtk.get_major_version() >= 3 and Gtk.get_minor_version() >= 20 +def have_gtk_version(version_string): + [major, minor, micro] = version_string.split(".", 3) + + return Gtk.get_major_version() >= eval(major) and \ + Gtk.get_minor_version() >= eval(minor) and \ + Gtk.get_micro_version() >= eval(micro) def do_quit(): Gtk.main_quit() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/volumeControl.py new/cinnamon-screensaver-3.2.3/src/volumeControl.py --- old/cinnamon-screensaver-3.2.2/src/volumeControl.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/volumeControl.py 2016-11-17 10:50:34.000000000 +0100 @@ -30,6 +30,11 @@ "button-press-event", self.on_button_press_event) + if not utils.have_gtk_version("3.18.0"): + trackers.con_tracker_get().connect(self.volume_slider, + "scroll-event", + self.on_scroll_event) + self.pack_start(self.volume_slider, False, False, 6) self.initialize_sound_controller() @@ -117,4 +122,15 @@ if event.button == 2: self.output.set_is_muted(not self.volume_slider.muted) - return Gdk.EVENT_PROPAGATE \ No newline at end of file + return Gdk.EVENT_PROPAGATE + + def on_scroll_event(self, widget, event): + success, dx, dy = event.get_scroll_deltas() + step = self.volume_slider.get_adjustment().get_step_increment() + + if dy < 0: + self.volume_slider.set_value(self.volume_slider.get_value() + step) + elif dy > 0: + self.volume_slider.set_value(self.volume_slider.get_value() - step) + + return Gdk.EVENT_STOP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.2/src/widgets/framedImage.py new/cinnamon-screensaver-3.2.3/src/widgets/framedImage.py --- old/cinnamon-screensaver-3.2.2/src/widgets/framedImage.py 2016-11-13 14:16:29.000000000 +0100 +++ new/cinnamon-screensaver-3.2.3/src/widgets/framedImage.py 2016-11-17 10:50:34.000000000 +0100 @@ -36,7 +36,7 @@ def get_theme_height(self): ctx = self.get_style_context() - if utils.have_gtk_3_20(): + if utils.have_gtk_version("3.20.0"): return ctx.get_property("min-height", Gtk.StateFlags.NORMAL) else: color = ctx.get_color(Gtk.StateFlags.NORMAL)