[gnome-settings-daemon] bnc#578296 - Always set the position of outputs, even if they are already turned on
- From: Federico Mena Quintero <federico src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] bnc#578296 - Always set the position of outputs, even if they are already turned on
- Date: Wed, 10 Feb 2010 19:39:22 +0000 (UTC)
commit e312f01b690de11112fb58395b8710f988520951
Author: Federico Mena Quintero <federico novell com>
Date: Wed Feb 10 13:39:36 2010 -0600
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>
plugins/xrandr/gsd-xrandr-manager.c | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 9f1fb6c..08a75d5 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);
- }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]