[gnome-control-center] display: update primary when turning displays off
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] display: update primary when turning displays off
- Date: Tue, 23 Nov 2010 13:02:46 +0000 (UTC)
commit 49e0499e3b760bb639e9759356cc645198099698
Author: William Jon McCann <jmccann redhat com>
Date: Tue Nov 23 08:02:19 2010 -0500
display: update primary when turning displays off
panels/display/xrandr-capplet.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/panels/display/xrandr-capplet.c b/panels/display/xrandr-capplet.c
index f732d25..8ee28ce 100644
--- a/panels/display/xrandr-capplet.c
+++ b/panels/display/xrandr-capplet.c
@@ -140,6 +140,7 @@ on_screen_changed (GnomeRRScreen *scr,
App *app = data;
current = gnome_rr_config_new_current (app->screen);
+ gnome_rr_config_ensure_primary (current);
if (app->current_configuration)
gnome_rr_config_free (app->current_configuration);
@@ -751,7 +752,6 @@ static void
monitor_on_off_toggled_cb (GtkToggleButton *toggle, gpointer data)
{
App *app = data;
- gboolean is_on;
if (!app->current_output)
return;
@@ -760,20 +760,21 @@ monitor_on_off_toggled_cb (GtkToggleButton *toggle, gpointer data)
return;
if (GTK_WIDGET (toggle) == app->monitor_on_radio)
- is_on = TRUE;
+ {
+ app->current_output->on = TRUE;
+ select_resolution_for_current_output (app);
+ }
else if (GTK_WIDGET (toggle) == app->monitor_off_radio)
- is_on = FALSE;
+ {
+ app->current_output->on = FALSE;
+ gnome_rr_config_ensure_primary (app->current_configuration);
+ }
else
{
g_assert_not_reached ();
return;
}
- app->current_output->on = is_on;
-
- if (is_on)
- select_resolution_for_current_output (app);
-
rebuild_gui (app);
foo_scroll_area_invalidate (FOO_SCROLL_AREA (app->area));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]