If the check for missing depths, try actually creating pixmaps of the

Fri Aug  1 16:30:13 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render):
        If the check for missing depths, try actually creating pixmaps
        of the depths to deal with Xinerama not reporting
        all the depths it should. (#115822)
This commit is contained in:
Owen Taylor 2003-08-01 20:37:56 +00:00 committed by Owen Taylor
parent f149c99977
commit 10a3ddf6cc
6 changed files with 66 additions and 0 deletions

View File

@ -1,3 +1,10 @@
Fri Aug 1 16:30:13 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render):
If the check for missing depths, try actually creating pixmaps
of the depths to deal with Xinerama not reporting
all the depths it should. (#115822)
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to

View File

@ -1,3 +1,10 @@
Fri Aug 1 16:30:13 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render):
If the check for missing depths, try actually creating pixmaps
of the depths to deal with Xinerama not reporting
all the depths it should. (#115822)
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to

View File

@ -1,3 +1,10 @@
Fri Aug 1 16:30:13 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render):
If the check for missing depths, try actually creating pixmaps
of the depths to deal with Xinerama not reporting
all the depths it should. (#115822)
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to

View File

@ -1,3 +1,10 @@
Fri Aug 1 16:30:13 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render):
If the check for missing depths, try actually creating pixmaps
of the depths to deal with Xinerama not reporting
all the depths it should. (#115822)
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to

View File

@ -1,3 +1,10 @@
Fri Aug 1 16:30:13 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render):
If the check for missing depths, try actually creating pixmaps
of the depths to deal with Xinerama not reporting
all the depths it should. (#115822)
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to

View File

@ -224,6 +224,17 @@ gdk_drawable_impl_x11_finalize (GObject *object)
}
#ifdef HAVE_XFT
static void
try_pixmap (Display *xdisplay,
int screen,
int depth)
{
Pixmap pixmap = XCreatePixmap (xdisplay,
RootWindow (xdisplay, screen),
1, 1, depth);
XFreePixmap (xdisplay, pixmap);
}
gboolean
_gdk_x11_have_render (GdkDisplay *display)
{
@ -266,6 +277,26 @@ _gdk_x11_have_render (GdkDisplay *display)
XFree (depths);
}
/* At this point, we might have a false positive;
* buggy versions of Xinerama only report depths for
* which there is an associated visual; so we actually
* go ahead and try create pixmaps.
*/
if (!(has_8 && has_32))
{
gdk_error_trap_push ();
if (!has_8)
try_pixmap (xdisplay, screen, 8);
if (!has_32)
try_pixmap (xdisplay, screen, 32);
XSync (xdisplay, False);
if (gdk_error_trap_pop () == 0)
{
has_8 = TRUE;
has_32 = TRUE;
}
}
if (!(has_8 && has_32))
{
g_warning ("The X server advertises that RENDER support is present,\n"