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


svn path=/branches/gtk-2-14/; revision=21790
This commit is contained in:
Matthias Clasen
2008-11-15 00:38:29 +00:00
parent b01062ec91
commit 0619940a7f
2 changed files with 21 additions and 1 deletions

View File

@@ -1,3 +1,13 @@
2008-11-14 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
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
2008-11-14 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:

View File

@@ -236,7 +236,17 @@ gdk_display_open (const gchar *display_name)
#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;