[gnome-settings-daemon/gnome-3-12] power: signal a backlight change after initializing the rrscreen
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-12] power: signal a backlight change after initializing the rrscreen
- Date: Mon, 5 May 2014 14:33:45 +0000 (UTC)
commit e65c7195aaa3d4d57e87e3ede6aad025875a4ae7
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat May 3 19:24:25 2014 +0200
power: signal a backlight change after initializing the rrscreen
Similar to what we do for the kbd backlight, send a fake backlight
changed event, to avoid the case when we get a dbus call from
gnome-shell before we initialized, causing the slider in the menu
to be 0 until the next change.
https://bugzilla.gnome.org/show_bug.cgi?id=729500
plugins/power/gsd-power-manager.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index bb48996..21acb00 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2358,6 +2358,15 @@ on_rr_screen_acquired (GObject *object,
/* don't blank inside a VM */
manager->priv->is_virtual_machine = gsd_power_is_hardware_a_vm ();
+ /* queue a signal in case the proxy from gnome-shell was created before we got here
+ (likely, considering that to get here we need a reply from gnome-shell)
+ */
+ if (manager->priv->backlight_available)
+ backlight_iface_emit_changed (manager, GSD_POWER_DBUS_INTERFACE_SCREEN,
+ backlight_get_percentage (manager->priv->rr_screen, NULL));
+ else
+ backlight_iface_emit_changed (manager, GSD_POWER_DBUS_INTERFACE_SCREEN, -1);
+
gnome_settings_profile_end (NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]