gtk+ r21790 - in branches/gtk-2-14: . gdk/x11



Author: matthiasc
Date: Sat Nov 15 00:38:29 2008
New Revision: 21790
URL: http://svn.gnome.org/viewvc/gtk+?rev=21790&view=rev

Log:
        Bug 552956 â Should check composite extension version

        * gdk/x11/gdkdisplay-x11.c: Check that the version of the
        composite extension is at least 0.4.
        Patch by Owen Taylor



Modified:
   branches/gtk-2-14/ChangeLog
   branches/gtk-2-14/gdk/x11/gdkdisplay-x11.c

Modified: branches/gtk-2-14/gdk/x11/gdkdisplay-x11.c
==============================================================================
--- branches/gtk-2-14/gdk/x11/gdkdisplay-x11.c	(original)
+++ branches/gtk-2-14/gdk/x11/gdkdisplay-x11.c	Sat Nov 15 00:38:29 2008
@@ -236,7 +236,17 @@
 #ifdef HAVE_XCOMPOSITE
   if (XCompositeQueryExtension (display_x11->xdisplay,
 				&ignore, &ignore))
-      display_x11->have_xcomposite = TRUE;
+    {
+      int major, minor;
+              
+      XCompositeQueryVersion (display_x11->xdisplay, &major, &minor);
+
+      /* Prior to Composite version 0.4, composited windows clipped their
+       * parents, so you had to use IncludeInferiors to draw to the parent
+       * This isn't useful for our purposes, so require 0.4
+       */
+      display_x11->have_xcomposite = major > 0 || (major == 0 && minor >= 4);
+    }
   else
 #endif
     display_x11->have_xcomposite = FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]