Avoid making lots of DBus calls to set the brightness when the slider changes

too quickly

https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/805473
This commit is contained in:
Rodrigo Moya 2011-07-05 16:39:17 +02:00
parent b2be7a7b4c
commit 9132f8f2f8

View file

@ -221,6 +221,9 @@ brightness_slider_value_changed_cb (GtkRange *range, gpointer user_data)
CcScreenPanelPrivate *priv = CC_SCREEN_PANEL (user_data)->priv;
/* do not loop */
if (priv->setting_brightness)
return;
priv->setting_brightness = TRUE;
/* push this to g-p-m */