[gnome-settings-daemon/docking-stations] connect_after to the UpClient::changed from the power plugin
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/docking-stations] connect_after to the UpClient::changed from the power plugin
- Date: Wed, 7 Dec 2011 19:12:00 +0000 (UTC)
commit 41d35156bf1abe71c4c72ae7e00025b415dfe68b
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Dec 7 11:33:21 2011 -0600
connect_after to the UpClient::changed from the power plugin
This lets the xrandr plugin, which is the other user of UpClient::changed, to run
its signal handler *first*. By the time the handler in the power plugin gets called,
all the RANDR outputs will be configured correctly and the power plugin will
be able to make its decision about whether to suspend the machine or not.
Doing this with signals instead of an async DBus calls simplifies things,
and removes the scary/racy asynchronicity of suspending vs. reconfiguring outputs.
Signed-off-by: Federico Mena Quintero <federico gnome org>
plugins/power/gsd-power-manager.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 9629079..3b0e834 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -3341,8 +3341,8 @@ gsd_power_manager_start (GsdPowerManager *manager,
G_CALLBACK (engine_device_removed_cb), manager);
g_signal_connect (manager->priv->up_client, "device-changed",
G_CALLBACK (engine_device_changed_cb), manager);
- g_signal_connect (manager->priv->up_client, "changed",
- G_CALLBACK (up_client_changed_cb), manager);
+ g_signal_connect_after (manager->priv->up_client, "changed",
+ G_CALLBACK (up_client_changed_cb), manager);
/* use the fallback name from gnome-power-manager so the shell
* blocks this, and uses the power extension instead */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]