[gnome-settings-daemon/randr-osd: 25/60] bnc#578296 - Always set the position of outputs, even if they are already turned on
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/randr-osd: 25/60] bnc#578296 - Always set the position of outputs, even if they are already turned on
- Date: Wed, 3 Mar 2010 23:48:41 +0000 (UTC)
commit 80c9e0abe06ce3bb422df59a711f3869f788f2b9
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 | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 10aa272..1576728 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -735,11 +735,9 @@ make_laptop_stock_config (GnomeRRScreen *screen)
GnomeOutputInfo *info = rr_config->outputs[i];
if (is_laptop (info)) {
- if (!info->on) {
- if (!turn_on (screen, info, 0, 0)) {
- gnome_rr_config_free (rr_config);
- return NULL;
- }
+ if (!turn_on (screen, info, 0, 0)) {
+ gnome_rr_config_free (rr_config);
+ return NULL;
}
}
else {
@@ -758,14 +756,8 @@ make_laptop_stock_config (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;
}
@@ -819,9 +811,8 @@ make_external_stock_config (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]