rpms/gtk2/devel gtk+-2.14.1-no-randr.patch, NONE, 1.1 gtk2.spec, 1.320, 1.321

Soren Sandmann Pedersen ssp at fedoraproject.org
Wed Sep 10 10:30:12 UTC 2008


Author: ssp

Update of /cvs/pkgs/rpms/gtk2/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29177

Modified Files:
	gtk2.spec 
Added Files:
	gtk+-2.14.1-no-randr.patch 
Log Message:
Remove use of randr in init_multihead

gtk+-2.14.1-no-randr.patch:

--- NEW FILE gtk+-2.14.1-no-randr.patch ---
Index: gdk/x11/gdkscreen-x11.c
===================================================================
--- gdk/x11/gdkscreen-x11.c	(revision 21333)
+++ gdk/x11/gdkscreen-x11.c	(working copy)
@@ -664,81 +664,6 @@
 }
 
 static gboolean
-init_randr12 (GdkScreen *screen)
-{
-#ifdef HAVE_RANDR
-  GdkDisplay *display = gdk_screen_get_display (screen);
-  GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
-  GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
-  Display *dpy = GDK_SCREEN_XDISPLAY (screen);
-  XRRScreenResources *resources;
-  int i;
-  GArray *monitors;
-  gboolean randr12_compat = FALSE;
-
-  if (!display_x11->have_randr12)
-      return FALSE;
-
-  resources = XRRGetScreenResources (screen_x11->xdisplay,
-				     screen_x11->xroot_window);
-  if (!resources)
-    return FALSE;
-  
-  monitors = g_array_sized_new (FALSE, TRUE, sizeof (GdkX11Monitor),
-                                resources->noutput);
-
-  for (i = 0; i < resources->noutput; ++i)
-    {
-      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;
-	  XRRCrtcInfo *crtc = XRRGetCrtcInfo (dpy, resources, output->crtc);
-
-	  monitor.geometry.x = crtc->x;
-	  monitor.geometry.y = crtc->y;
-	  monitor.geometry.width = crtc->width;
-	  monitor.geometry.height = crtc->height;
-
-	  /* FIXME: fill this out properly - need EDID parser */
-	  monitor.output = resources->outputs[i];
-	  monitor.width_mm = -1;
-	  monitor.height_mm = -1;
-	  monitor.output_name = NULL;
-	  monitor.manufacturer = NULL;
-
-	  g_array_append_val (monitors, monitor);
-
-          XRRFreeCrtcInfo (crtc);
-	}
-
-      XRRFreeOutputInfo (output);
-    }
-
-  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);
-
-  return TRUE;
-#endif
-  
-  return FALSE;
-}
-
-static gboolean
 init_solaris_xinerama (GdkScreen *screen)
 {
 #ifdef HAVE_SOLARIS_XINERAMA
@@ -861,14 +786,14 @@
    *  3. Solaris Xinerama
    *  4. XFree86/Xorg Xinerama
    *
-   * We use them in that order.
+   * However, there are performance issues with calling
+   * XRRGetScreenResources() every time an application starts,
+   * so in the RandR case we simply rely on the information being
+   * exported through Xinerama as well.
    */
   if (init_fake_xinerama (screen))
     return;
 
-  if (init_randr12 (screen))
-    return;
-
   if (XQueryExtension (GDK_SCREEN_XDISPLAY (screen), "XINERAMA",
 		       &opcode, &firstevent, &firsterror))
     {


Index: gtk2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gtk2/devel/gtk2.spec,v
retrieving revision 1.320
retrieving revision 1.321
diff -u -r1.320 -r1.321
--- gtk2.spec	5 Sep 2008 14:08:48 -0000	1.320
+++ gtk2.spec	10 Sep 2008 10:29:42 -0000	1.321
@@ -16,7 +16,7 @@
 Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
 Name: gtk2
 Version: %{base_version}
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 Source: http://download.gnome.org/sources/gtk+/2.14/gtk+-%{version}.tar.bz2
@@ -32,6 +32,7 @@
 Patch2: workaround.patch
 # fixed upstream
 Patch3: init-deadlock.patch
+Patch4: gtk+-2.14.1-no-randr.patch
 
 BuildRequires: atk-devel >= %{atk_version}
 BuildRequires: pango-devel >= %{pango_version}
@@ -118,6 +119,7 @@
 %patch1 -p1 -b .set-invisible-char-to-bullet
 %patch2 -p1 -b .workaround
 %patch3 -p0 -b .init-deadlock
+%patch4 -p0 -b .no-randr
 
 for i in config.guess config.sub ; do
   test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i .




More information about the fedora-extras-commits mailing list