[gnome-settings-daemon/docking-stations] Get the lid state notification from the shared UpClient
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/docking-stations] Get the lid state notification from the shared UpClient
- Date: Wed, 7 Dec 2011 19:11:50 +0000 (UTC)
commit d946672c05fe834f9114a17c2c44905ec177ab35
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Dec 7 11:27:30 2011 -0600
Get the lid state notification from the shared UpClient
Signed-off-by: Federico Mena Quintero <federico gnome org>
plugins/xrandr/gsd-xrandr-manager.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index a31b513..79246a2 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -1925,8 +1925,9 @@ turn_off_laptop_display (GsdXrandrManager *manager, guint32 timestamp)
}
static void
-lid_state_changed (GsdXrandrManager *manager)
+power_client_changed_cb (UpClient *client, gpointer data)
{
+ GsdXrandrManager *manager = data;
GsdXrandrManagerPrivate *priv = manager->priv;
gboolean is_closed;
@@ -1966,6 +1967,8 @@ gsd_xrandr_manager_start (GsdXrandrManager *manager,
manager->priv->upower_client = gnome_settings_session_get_upower_client ();
manager->priv->laptop_lid_is_closed = up_client_get_lid_is_closed (manager->priv->upower_client);
+ g_signal_connect (manager->priv->upower_client, "changed",
+ G_CALLBACK (power_client_changed_cb), manager);
log_msg ("State of screen at startup:\n");
log_screen (manager->priv->rw_screen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]