Updating branch refs/heads/master
to e6962fa722eeec3ebe97ef96f7bc2b06331f64a5 (commit)
from 22b558bf644ecfd0fdf81ea91e8fe71c36980131 (commit)
commit e6962fa722eeec3ebe97ef96f7bc2b06331f64a5
Author: Lionel Le Folgoc <[email protected]>
Date: Thu Oct 18 16:58:45 2012 +0200
Set the primary output after the changes have been applied
And set it to None if no primary output was present in xfconf.
Signed-off-by: Simon Steinbeiss <[email protected]>
xfsettingsd/displays.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 2212092..7a14088 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -200,6 +200,8 @@ xfce_displays_helper_list_crtcs (Display
*xdisplay,
crtcs = g_new0 (XfceRRCrtc, resources->ncrtc);
for (n = 0; n < resources->ncrtc; ++n)
{
+ xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Detected CRTC %lu.",
resources->crtcs[n]);
+
crtcs[n].id = resources->crtcs[n];
crtc_info = XRRGetCrtcInfo (xdisplay, resources, resources->crtcs[n]);
crtcs[n].mode = crtc_info->mode;
@@ -463,6 +465,9 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper
*helper,
GPtrArray *connected_outputs;
GHashTable *saved_outputs;
XfceRROutput *output;
+#ifdef HAS_RANDR_ONE_POINT_THREE
+ RROutput primary = None;
+#endif
gdk_error_trap_push ();
@@ -522,7 +527,7 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper
*helper,
output->info->name);
value = g_hash_table_lookup (saved_outputs, property);
if (G_VALUE_HOLDS_BOOLEAN (value) && g_value_get_boolean (value))
- XRRSetOutputPrimary (xdisplay, GDK_WINDOW_XID (root_window),
output->id);
+ primary = output->id;
}
#endif
@@ -789,6 +794,11 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper
*helper,
}
}
+#ifdef HAS_RANDR_ONE_POINT_THREE
+ if (helper->has_1_3)
+ XRRSetOutputPrimary (xdisplay, GDK_WINDOW_XID (root_window),
primary);
+#endif
+
/* release the grab, changes are done */
gdk_x11_display_ungrab (display);
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits