diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2013-02-10 11:32:41 +0100 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2013-02-10 11:32:41 +0100 |
commit | bdf817c3549ba377334deb1161de703579670d62 (patch) | |
tree | c1b80c05c917cda2619e267049978f971bdad169 /extra/gnome-settings-daemon | |
parent | df609724f30aaccfb05d9fb73f68e7a37118f2f8 (diff) | |
parent | 1bb2648cde916ac27d3dd75d7b64a4ddc89787b7 (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
community/cdemu-client/PKGBUILD
community/dcron/PKGBUILD
community/freevo/PKGBUILD
community/gmerlin-avdecoder/PKGBUILD
community/hacburn/PKGBUILD
community/htmldoc/PKGBUILD
community/ibus-table/PKGBUILD
community/iksemel/PKGBUILD
community/isomaster/PKGBUILD
community/libmatio/PKGBUILD
community/libtlen/PKGBUILD
community/luarocks/PKGBUILD
community/lxde-common/PKGBUILD
community/multipath-tools/PKGBUILD
community/nvclock/PKGBUILD
community/pam-krb5/PKGBUILD
community/pidgin-musictracker/PKGBUILD
community/pkgfile/PKGBUILD
community/pkgtools/PKGBUILD
community/print-manager/PKGBUILD
community/python-pyro/PKGBUILD
community/python-pyxmpp/PKGBUILD
community/python2-simplejson/PKGBUILD
community/rsnapshot/PKGBUILD
community/setconf/PKGBUILD
community/tagpy/PKGBUILD
community/terminator/PKGBUILD
community/udunits/PKGBUILD
community/vlock/PKGBUILD
community/winefish/PKGBUILD
core/nss-myhostname/PKGBUILD
extra/avfs/PKGBUILD
extra/bmp-musepack/PKGBUILD
extra/bmp-wma/PKGBUILD
extra/bochs/PKGBUILD
extra/botan/PKGBUILD
extra/cdargs/PKGBUILD
extra/cx_freeze/PKGBUILD
extra/dcfldd/PKGBUILD
extra/devilspie/PKGBUILD
extra/emelfm2/PKGBUILD
extra/evilwm/PKGBUILD
extra/fssos-nsvs/PKGBUILD
extra/gimp-dbp/PKGBUILD
extra/gimp-gap/PKGBUILD
extra/gimp-ufraw/PKGBUILD
extra/gmpc/PKGBUILD
extra/gtkpod/PKGBUILD
extra/hercules/PKGBUILD
extra/herqq/PKGBUILD
extra/hydrogen/PKGBUILD
extra/kdegames/PKGBUILD
extra/kradio/PKGBUILD
extra/kshutdown/PKGBUILD
extra/libmusicbrainz4/PKGBUILD
extra/mahjong/PKGBUILD
extra/mcrypt/PKGBUILD
extra/monica/PKGBUILD
extra/mpck/PKGBUILD
extra/mrtg/PKGBUILD
extra/nicotine/PKGBUILD
extra/normalize/PKGBUILD
extra/oprofile/PKGBUILD
extra/perl-event/PKGBUILD
extra/perl-unicode-string/PKGBUILD
extra/pidgin-encryption/PKGBUILD
extra/proftpd/PKGBUILD
extra/pymad/PKGBUILD
extra/qiv/PKGBUILD
extra/quodlibet/PKGBUILD
extra/ratpoison/PKGBUILD
extra/rox/PKGBUILD
extra/scrot/PKGBUILD
extra/stardict/PKGBUILD
extra/terminal/PKGBUILD
extra/usbview/PKGBUILD
extra/xdelta/PKGBUILD
extra/xdelta3/PKGBUILD
extra/xorg-xlsfonts/PKGBUILD
extra/zile/PKGBUILD
mozilla-testing/iceweasel-libre/mozconfig
mozilla-testing/iceweasel-libre/vendor.js
social/tokyocabinet/PKGBUILD
~fauno/notmuch/PKGBUILD
~mtjm/thinkfan/PKGBUILD
~mtjm/zbar/PKGBUILD
Diffstat (limited to 'extra/gnome-settings-daemon')
-rw-r--r-- | extra/gnome-settings-daemon/screensaver.patch | 145 | ||||
-rw-r--r-- | extra/gnome-settings-daemon/systemd-fallback.patch | 154 |
2 files changed, 0 insertions, 299 deletions
diff --git a/extra/gnome-settings-daemon/screensaver.patch b/extra/gnome-settings-daemon/screensaver.patch deleted file mode 100644 index bbcfe3430..000000000 --- a/extra/gnome-settings-daemon/screensaver.patch +++ /dev/null @@ -1,145 +0,0 @@ -From b47e4019a12ac84fba31e1c631d878ce03fa3808 Mon Sep 17 00:00:00 2001 -From: Rui Matos <tiagomatos@gmail.com> -Date: Wed, 17 Oct 2012 22:44:54 +0000 -Subject: power: Add a watchdog to keep X's builtin screen saver disabled - -X's builtin screen saver may activate DPMS. Since we want to activate -DPMS ourselves according to our own policy we must make sure that X's -screen saver remains disabled. - -This code is a copy of the original found in gs-watcher-x11.c from -gnome-screensaver which stopped being used in GNOME 3.6. - -https://bugzilla.gnome.org/show_bug.cgi?id=686339 ---- -diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c -index 0e06495..070cf32 100644 ---- a/plugins/power/gsd-power-manager.c -+++ b/plugins/power/gsd-power-manager.c -@@ -27,6 +27,7 @@ - #include <stdio.h> - #include <sys/wait.h> - #include <glib/gi18n.h> -+#include <gdk/gdkx.h> - #include <gtk/gtk.h> - #include <libupower-glib/upower.h> - #include <libnotify/notify.h> -@@ -80,6 +81,8 @@ - /* Keep this in sync with gnome-shell */ - #define SCREENSAVER_FADE_TIME 10 /* seconds */ - -+#define XSCREENSAVER_WATCHDOG_TIMEOUT 120 /* seconds */ -+ - enum { - GSD_POWER_IDLETIME_NULL_ID, - GSD_POWER_IDLETIME_DIM_ID, -@@ -197,6 +200,7 @@ struct GsdPowerManagerPrivate - GsdPowerIdleMode current_idle_mode; - guint lid_close_safety_timer_id; - GtkStatusIcon *status_icon; -+ guint xscreensaver_watchdog_timer_id; - }; - - enum { -@@ -3621,6 +3625,77 @@ engine_session_active_changed_cb (GnomeSettingsSession *session, - idle_set_mode (manager, GSD_POWER_IDLE_MODE_NORMAL); - } - -+/* This timer goes off every few minutes, whether the user is idle or not, -+ to try and clean up anything that has gone wrong. -+ -+ It calls disable_builtin_screensaver() so that if xset has been used, -+ or some other program (like xlock) has messed with the XSetScreenSaver() -+ settings, they will be set back to sensible values (if a server extension -+ is in use, messing with xlock can cause the screensaver to never get a wakeup -+ event, and could cause monitor power-saving to occur, and all manner of -+ heinousness.) -+ -+ This code was originally part of gnome-screensaver, see -+ http://git.gnome.org/browse/gnome-screensaver/tree/src/gs-watcher-x11.c?id=fec00b12ec46c86334cfd36b37771cc4632f0d4d#n530 -+ */ -+static gboolean -+disable_builtin_screensaver (gpointer unused) -+{ -+ int current_server_timeout, current_server_interval; -+ int current_prefer_blank, current_allow_exp; -+ int desired_server_timeout, desired_server_interval; -+ int desired_prefer_blank, desired_allow_exp; -+ -+ XGetScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), -+ ¤t_server_timeout, -+ ¤t_server_interval, -+ ¤t_prefer_blank, -+ ¤t_allow_exp); -+ -+ desired_server_timeout = current_server_timeout; -+ desired_server_interval = current_server_interval; -+ desired_prefer_blank = current_prefer_blank; -+ desired_allow_exp = current_allow_exp; -+ -+ desired_server_interval = 0; -+ -+ /* I suspect (but am not sure) that DontAllowExposures might have -+ something to do with powering off the monitor as well, at least -+ on some systems that don't support XDPMS? Who know... */ -+ desired_allow_exp = AllowExposures; -+ -+ /* When we're not using an extension, set the server-side timeout to 0, -+ so that the server never gets involved with screen blanking, and we -+ do it all ourselves. (However, when we *are* using an extension, -+ we tell the server when to notify us, and rather than blanking the -+ screen, the server will send us an X event telling us to blank.) -+ */ -+ desired_server_timeout = 0; -+ -+ if (desired_server_timeout != current_server_timeout -+ || desired_server_interval != current_server_interval -+ || desired_prefer_blank != current_prefer_blank -+ || desired_allow_exp != current_allow_exp) { -+ -+ g_debug ("disabling server builtin screensaver:" -+ " (xset s %d %d; xset s %s; xset s %s)", -+ desired_server_timeout, -+ desired_server_interval, -+ (desired_prefer_blank ? "blank" : "noblank"), -+ (desired_allow_exp ? "expose" : "noexpose")); -+ -+ XSetScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), -+ desired_server_timeout, -+ desired_server_interval, -+ desired_prefer_blank, -+ desired_allow_exp); -+ -+ XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE); -+ } -+ -+ return TRUE; -+} -+ - gboolean - gsd_power_manager_start (GsdPowerManager *manager, - GError **error) -@@ -3778,6 +3853,9 @@ gsd_power_manager_start (GsdPowerManager *manager, - /* set the initial dim time that can adapt for the user */ - refresh_idle_dim_settings (manager); - -+ manager->priv->xscreensaver_watchdog_timer_id = g_timeout_add_seconds (XSCREENSAVER_WATCHDOG_TIMEOUT, -+ disable_builtin_screensaver, -+ NULL); - gnome_settings_profile_end (NULL); - return TRUE; - } -@@ -3829,6 +3907,11 @@ gsd_power_manager_stop (GsdPowerManager *manager) - - g_clear_object (&manager->priv->idletime); - g_clear_object (&manager->priv->status_icon); -+ -+ if (manager->priv->xscreensaver_watchdog_timer_id > 0) { -+ g_source_remove (manager->priv->xscreensaver_watchdog_timer_id); -+ manager->priv->xscreensaver_watchdog_timer_id = 0; -+ } - } - - static void --- -cgit v0.9.0.2 diff --git a/extra/gnome-settings-daemon/systemd-fallback.patch b/extra/gnome-settings-daemon/systemd-fallback.patch deleted file mode 100644 index da0496623..000000000 --- a/extra/gnome-settings-daemon/systemd-fallback.patch +++ /dev/null @@ -1,154 +0,0 @@ -commit b9ded09387f0b99ece97baee18595eb9e86a5b9b -Author: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> -Date: Mon Mar 12 01:52:54 2012 +0100 - - Fallback to CK if systemd is not available - - Be nice to distributions where systemd is optional. This will select - the code path at runtime depending on whether the system was booted - using systemd. - -diff --git a/configure.ac b/configure.ac -index 3b4789f..d522852 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -299,7 +299,7 @@ AC_ARG_ENABLE([systemd], - [with_systemd=$enableval], - [with_systemd=no]) - if test "$with_systemd" = "yes" ; then -- PKG_CHECK_MODULES(SYSTEMD, [libsystemd-login]) -+ PKG_CHECK_MODULES(SYSTEMD, [libsystemd-daemon libsystemd-login]) - AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is used for session tracking]) - SESSION_TRACKING=systemd - else -diff --git a/gnome-settings-daemon/gnome-settings-session.c b/gnome-settings-daemon/gnome-settings-session.c -index 5786300..83fe21e 100644 ---- a/gnome-settings-daemon/gnome-settings-session.c -+++ b/gnome-settings-daemon/gnome-settings-session.c -@@ -30,6 +30,7 @@ - #include "gnome-settings-session.h" - - #ifdef HAVE_SYSTEMD -+#include <systemd/sd-daemon.h> - #include <systemd/sd-login.h> - - typedef struct -@@ -130,10 +131,9 @@ struct GnomeSettingsSessionPrivate - { - #ifdef HAVE_SYSTEMD - GSource *sd_source; --#else -+#endif - GDBusProxy *proxy_session; - GCancellable *cancellable; --#endif - gchar *session_id; - GnomeSettingsSessionState state; - }; -@@ -237,7 +237,7 @@ sessions_changed (gpointer user_data) - return TRUE; - } - --#else /* HAVE_SYSTEMD */ -+#endif /* HAVE_SYSTEMD */ - - static void - gnome_settings_session_proxy_signal_cb (GDBusProxy *proxy, -@@ -371,22 +371,25 @@ got_manager_proxy_cb (GObject *source_object, GAsyncResult *res, gpointer user_d - g_object_unref (proxy_manager); - } - --#endif /* HAVE_SYSTEMD */ -- - static void - gnome_settings_session_init (GnomeSettingsSession *session) - { - session->priv = GNOME_SETTINGS_SESSION_GET_PRIVATE (session); - - #ifdef HAVE_SYSTEMD -- sd_pid_get_session (getpid(), &session->priv->session_id); -+ session->priv->sd_source = NULL; -+ -+ if (sd_booted () > 0) { -+ sd_pid_get_session (getpid(), &session->priv->session_id); - -- session->priv->sd_source = sd_source_new (); -- g_source_set_callback (session->priv->sd_source, sessions_changed, session, NULL); -- g_source_attach (session->priv->sd_source, NULL); -+ session->priv->sd_source = sd_source_new (); -+ g_source_set_callback (session->priv->sd_source, sessions_changed, session, NULL); -+ g_source_attach (session->priv->sd_source, NULL); - -- sessions_changed (session); --#else -+ sessions_changed (session); -+ return; -+ } -+#endif - session->priv->cancellable = g_cancellable_new (); - - /* connect to ConsoleKit */ -@@ -399,7 +402,6 @@ gnome_settings_session_init (GnomeSettingsSession *session) - session->priv->cancellable, - got_manager_proxy_cb, - session); --#endif - } - - static void -@@ -415,15 +417,17 @@ gnome_settings_session_finalize (GObject *object) - if (session->priv->sd_source != NULL) { - g_source_destroy (session->priv->sd_source); - g_source_unref (session->priv->sd_source); -+ goto out; - } --#else -+#endif -+ - g_cancellable_cancel (session->priv->cancellable); - - if (session->priv->proxy_session != NULL) - g_object_unref (session->priv->proxy_session); - g_object_unref (session->priv->cancellable); --#endif - -+out: - G_OBJECT_CLASS (gnome_settings_session_parent_class)->finalize (object); - } - -diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c -index 8db04e5..9883d76 100644 ---- a/plugins/power/gsd-power-manager.c -+++ b/plugins/power/gsd-power-manager.c -@@ -2031,7 +2031,7 @@ systemd_stop (void) - g_object_unref (bus); - } - --#else -+#endif - - static void - consolekit_stop_cb (GObject *source_object, -@@ -2081,7 +2081,6 @@ consolekit_stop (void) - consolekit_stop_cb, NULL); - g_object_unref (proxy); - } --#endif - - static void - upower_sleep_cb (GObject *source_object, -@@ -2135,10 +2134,11 @@ do_power_action_type (GsdPowerManager *manager, - * hibernate is not available and is marginally better - * than just powering down the computer mid-write */ - #ifdef HAVE_SYSTEMD -- systemd_stop (); --#else -- consolekit_stop (); -+ if (sd_booted () > 0) -+ systemd_stop (); -+ else - #endif -+ consolekit_stop (); - break; - case GSD_POWER_ACTION_BLANK: - ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen, |