summaryrefslogtreecommitdiff
path: root/src/gpm-backlight.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-08-09 12:14:57 -0700
committerStefano Karapetsas <[email protected]>2013-08-09 12:14:57 -0700
commit753b74787e629905f9fdda268c5425471087faa6 (patch)
treea1e5760797b7c31de34538fe16dcd495fa6e188e /src/gpm-backlight.c
parente810bafae029af1dcb62e9f8e4e876dcff1f3314 (diff)
parent93b2cd78da14035d052275b91f2a827bb08ebea8 (diff)
downloadmate-power-manager-753b74787e629905f9fdda268c5425471087faa6.tar.bz2
mate-power-manager-753b74787e629905f9fdda268c5425471087faa6.tar.xz
Merge pull request #73 from NiceandGently/master
fix systemd-login1 support for gpm_manager_blank_screen
Diffstat (limited to 'src/gpm-backlight.c')
-rw-r--r--src/gpm-backlight.c10
1 files changed, 5 insertions, 5 deletions
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);