]> Pileus Git - ~andy/gtk/commitdiff
Don't use RandR 1.2 if driver is detected as randr12_compat (ie X driver
authorFrederic Crozat <fcrozat@mandriva.com>
Tue, 22 Jul 2008 17:41:39 +0000 (17:41 +0000)
committerFrédéric Crozat <fcrozat@src.gnome.org>
Tue, 22 Jul 2008 17:41:39 +0000 (17:41 +0000)
2008-07-22  Frederic Crozat  <fcrozat@mandriva.com>

        * gdk/x11/gdkscreen-x11.c: Don't use RandR 1.2
        if driver is detected as randr12_compat (ie X driver
        is not RandR 1.2 compliant). Fixes multihead with
        such drivers. Bug #543317.

svn path=/trunk/; revision=20893

ChangeLog
gdk/x11/gdkscreen-x11.c

index a566439ca55b977cd94bbbf1e7c7c10f56503f67..48a319cbd3c0f5cf050584b67015ec02d6199e89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-22  Frederic Crozat  <fcrozat@mandriva.com>
+
+       * gdk/x11/gdkscreen-x11.c: Don't use RandR 1.2
+       if driver is detected as randr12_compat (ie X driver
+       is not RandR 1.2 compliant). Fixes multihead with 
+       such drivers. Bug #543317.
+
 2008-07-21  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.in: Default to linking against Xinerama again,
index 624d1901e065dc88a9e842012863f81d12ad3d38..0fb700591ddc6234c116a5fb4e5170641d2ef255 100644 (file)
@@ -674,6 +674,7 @@ init_randr12 (GdkScreen *screen)
   XRRScreenResources *resources;
   int i;
   GArray *monitors;
+  gboolean randr12_compat = FALSE;
 
   if (!display_x11->have_randr12)
       return FALSE;
@@ -691,6 +692,9 @@ init_randr12 (GdkScreen *screen)
       XRROutputInfo *output =
        XRRGetOutputInfo (dpy, resources, resources->outputs[i]);
 
+      /* Non RandR1.2 X driver have output name "default" */
+      randr12_compat |= !g_strcmp0(output->name, "default");
+
       if (output->crtc)
        {
          GdkX11Monitor monitor;
@@ -718,6 +722,13 @@ init_randr12 (GdkScreen *screen)
 
   XRRFreeScreenResources (resources);
 
+  /* non RandR 1.2 X driver doesn't return any usable multihead data */
+  if (randr12_compat)
+    {
+      g_array_free (monitors, TRUE);
+      return FALSE;
+    }
+
   screen_x11->n_monitors = monitors->len;
   screen_x11->monitors = (GdkX11Monitor *)g_array_free (monitors, FALSE);