[mate-power-manager] add mate-power-manager_fix-display-to-sleep-when-inactive.patch
Wolfgang Ulbrich
raveit65 at fedoraproject.org
Fri Aug 9 20:10:36 UTC 2013
commit 4682208589d61f40507ee15f9b14487e2c15ac38
Author: raveit65 <chat-to-me at raveit.de>
Date: Fri Aug 9 22:10:19 2013 +0200
add mate-power-manager_fix-display-to-sleep-when-inactive.patch
...anager_fix-display-to-sleep-when-inactive.patch | 77 ++++++++++++++++++++
1 files changed, 77 insertions(+), 0 deletions(-)
---
diff --git a/mate-power-manager_fix-display-to-sleep-when-inactive.patch b/mate-power-manager_fix-display-to-sleep-when-inactive.patch
new file mode 100644
index 0000000..53a9f83
--- /dev/null
+++ b/mate-power-manager_fix-display-to-sleep-when-inactive.patch
@@ -0,0 +1,77 @@
+From 753b74787e629905f9fdda268c5425471087faa6 Mon Sep 17 00:00:00 2001
+From: Stefano Karapetsas <stefano at karapetsas.com>
+Date: Fri, 09 Aug 2013 19:14:57 +0000
+Subject: Merge pull request #73 from NiceandGently/master
+
+fix systemd-login1 support for gpm_manager_blank_screen
+---
+diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c
+index c2d58e2..8e20400 100644
+--- a/src/gpm-backlight.c
++++ b/src/gpm-backlight.c
+@@ -66,7 +66,7 @@ struct GpmBacklightPrivate
+ GpmControl *control;
+ GpmDpms *dpms;
+ GpmIdle *idle;
+- EggConsoleKit *consolekit;
++ EggConsoleKit *console;
+ gboolean can_dim;
+ gboolean system_is_idle;
+ GTimer *idle_timer;
+@@ -554,8 +554,8 @@ idle_changed_cb (GpmIdle *idle, GpmIdleMode mode, GpmBacklight *backlight)
+ if (gpm_button_is_lid_closed (backlight->priv->button))
+ return;
+
+- /* don't dim or undim the screen unless we are on the active console */
+- if (!egg_console_kit_is_active (backlight->priv->consolekit)) {
++ /* don't dim or undim the screen unless ConsoleKit/systemd say we are on the active console */
++ if (!LOGIND_RUNNING() && !egg_console_kit_is_active (backlight->priv->console)) {
+ egg_debug ("ignoring as not on active console");
+ return;
+ }
+@@ -677,7 +677,7 @@ gpm_backlight_finalize (GObject *object)
+ g_object_unref (backlight->priv->button);
+ g_object_unref (backlight->priv->idle);
+ g_object_unref (backlight->priv->brightness);
+- g_object_unref (backlight->priv->consolekit);
++ g_object_unref (backlight->priv->console);
+
+ g_return_if_fail (backlight->priv != NULL);
+ G_OBJECT_CLASS (gpm_backlight_parent_class)->finalize (object);
+@@ -772,7 +772,7 @@ gpm_backlight_init (GpmBacklight *backlight)
+ G_CALLBACK (control_resume_cb), backlight);
+
+ /* Don't do dimming on inactive console */
+- backlight->priv->consolekit = egg_console_kit_new ();
++ backlight->priv->console = egg_console_kit_new ();
+
+ /* sync at startup */
+ gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, TRUE);
+diff --git a/src/gpm-manager.c b/src/gpm-manager.c
+index aeb5a31..7561b22 100644
+--- a/src/gpm-manager.c
++++ b/src/gpm-manager.c
+@@ -775,8 +775,8 @@ gpm_manager_idle_do_sleep (GpmManager *manager)
+ static void
+ gpm_manager_idle_changed_cb (GpmIdle *idle, GpmIdleMode mode, GpmManager *manager)
+ {
+- /* ConsoleKit says we are not on active console */
+- if (!egg_console_kit_is_active (manager->priv->console)) {
++ /* ConsoleKit/systemd say we are not on active console */
++ if (!LOGIND_RUNNING() && !egg_console_kit_is_active (manager->priv->console)) {
+ egg_debug ("ignoring as not on active console");
+ return;
+ }
+@@ -1004,8 +1004,8 @@ gpm_manager_client_changed_cb (UpClient *client, GpmManager *manager)
+ /* save in local cache */
+ manager->priv->on_battery = on_battery;
+
+- /* ConsoleKit says we are not on active console */
+- if (!egg_console_kit_is_active (manager->priv->console)) {
++ /* ConsoleKit/systemd say we are not on active console */
++ if (!LOGIND_RUNNING() && !egg_console_kit_is_active (manager->priv->console)) {
+ egg_debug ("ignoring as not on active console");
+ return;
+ }
+--
+cgit
More information about the scm-commits
mailing list