summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-02-10 13:39:36 -0600
committerFederico Mena Quintero <federico@novell.com>2010-02-10 13:39:36 -0600
commite312f01b690de11112fb58395b8710f988520951 (patch)
tree04c19e82fba0ea79225e4d864510d5a9eee93539
parent71e8762a17d15320639880430a15e37e07825398 (diff)
downloadgnome-settings-daemon-e312f01b690de11112fb58395b8710f988520951.tar.gz
bnc#578296 - Always set the position of outputs, even if they are already turned on
Normally we would only position outputs that were turned off, but we actually need to do this for all outputs that will remain on. Otherwise they could retain their old positions, which is wrong when in 'other' mode we retain a single external output with a non-zero X offset. Based on a patch by Takashi Iwai <tiwai@novell.com> Signed-off-by: Federico Mena Quintero <federico@novell.com>
-rw-r--r--plugins/xrandr/gsd-xrandr-manager.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 9f1fb6c8..08a75d5c 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -697,12 +697,10 @@ make_laptop_setup (GnomeRRScreen *screen)
GnomeOutputInfo *info = result->outputs[i];
if (is_laptop (info)) {
- if (!info->on) {
- if (!turn_on (screen, info, 0, 0)) {
- gnome_rr_config_free (result);
- result = NULL;
- break;
- }
+ if (!turn_on (screen, info, 0, 0)) {
+ gnome_rr_config_free (result);
+ result = NULL;
+ break;
}
}
else {
@@ -722,14 +720,8 @@ make_laptop_setup (GnomeRRScreen *screen)
static int
turn_on_and_get_rightmost_offset (GnomeRRScreen *screen, GnomeOutputInfo *info, int x)
{
- if (info->on) {
- info->x = x;
- info->y = 0;
+ if (turn_on (screen, info, x, 0))
x += info->width;
- } else {
- if (turn_on (screen, info, x, 0))
- x += info->width;
- }
return x;
}
@@ -781,9 +773,8 @@ make_other_setup (GnomeRRScreen *screen)
info->on = FALSE;
}
else {
- if (info->connected && !info->on) {
+ if (info->connected)
turn_on (screen, info, 0, 0);
- }
}
}