gnome-control-center r8748 - branches/randr-12/capplets/display
- From: federico svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r8748 - branches/randr-12/capplets/display
- Date: Wed, 4 Jun 2008 20:40:13 +0000 (UTC)
Author: federico
Date: Wed Jun 4 20:40:13 2008
New Revision: 8748
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8748&view=rev
Log:
Detect if the X driver supports RANDR 1.2
2008-06-04 Federico Mena Quintero <federico novell com>
* xrandr-capplet.c (driver_is_randr_10): New function, currently
unused, to detect whether the graphics driver used in the X server
only supports the RANDR 1.0 API. We may find this information
useful to tell the user that not all the features in the capplet
will work as intended, or to actually disable features that won't work.
Signed-off-by: Federico Mena Quintero <federico novell com>
Modified:
branches/randr-12/capplets/display/ChangeLog
branches/randr-12/capplets/display/xrandr-capplet.c
Modified: branches/randr-12/capplets/display/xrandr-capplet.c
==============================================================================
--- branches/randr-12/capplets/display/xrandr-capplet.c (original)
+++ branches/randr-12/capplets/display/xrandr-capplet.c Wed Jun 4 20:40:13 2008
@@ -494,6 +494,17 @@
return count;
}
+static int
+count_all_outputs (Configuration *config)
+{
+ int i;
+
+ for (i = 0; config->outputs[i] != NULL; i++)
+ ;
+
+ return i;
+}
+
static void
rebuild_resolution_combo (App *app)
{
@@ -1545,6 +1556,27 @@
}
}
+/* Returns whether the graphics driver doesn't advertise RANDR 1.2 features, and just 1.0 */
+static gboolean
+driver_is_randr_10 (Configuration *config)
+{
+ /* In the Xorg code, see xserver/randr/rrinfo.c:RRScanOldConfig(). It gets
+ * called when the graphics driver doesn't support RANDR 1.2 yet, just 1.0.
+ * In that case, the X server's base code (which supports RANDR 1.2) will
+ * simulate having a single output called "default". For drivers that *do*
+ * support RANDR 1.2, the separate outputs will be named differently, we
+ * hope.
+ *
+ * This heuristic is courtesy of Dirk Mueller <dmueller suse de>
+ *
+ * FIXME: however, we don't even check for XRRQueryVersion() returning 1.2, neither
+ * here nor in gnome-desktop/libgnomedesktop/*.c. Do we need to check for that,
+ * or is rw_screen_new()'s return value sufficient?
+ */
+
+ return (count_all_outputs (config) == 1 && strcmp (config->outputs[0]->name, "default") == 0);
+}
+
static void
on_detect_displays (GtkWidget *widget, gpointer data)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]