diff --git a/panels/screen/cc-screen-panel.c b/panels/screen/cc-screen-panel.c index f365d714d..c76a63d9c 100644 --- a/panels/screen/cc-screen-panel.c +++ b/panels/screen/cc-screen-panel.c @@ -186,21 +186,21 @@ on_signal (GDBusProxy *proxy, { CcScreenPanel *self = CC_SCREEN_PANEL (user_data); - if (g_strcmp0 (signal_name, "BrightnessChanged") == 0) + if (g_strcmp0 (signal_name, "Changed") == 0) { - guint brightness; - GtkRange *range; - /* changed, but ignoring */ if (self->priv->setting_brightness) return; - /* update the bar */ - g_variant_get (parameters, - "(u)", - &brightness); - range = GTK_RANGE (WID ("screen_brightness_hscale")); - gtk_range_set_value (range, brightness); + /* retrieve the value again from g-s-d */ + g_dbus_proxy_call (self->priv->proxy, + "GetPercentage", + NULL, + G_DBUS_CALL_FLAGS_NONE, + 200, /* we don't want to randomly move the bar */ + self->priv->cancellable, + get_brightness_cb, + user_data); } }