querying for XRender



this patch makes gdk query for the XRender extension before using it.  i
found it helpful whilst testing things in an Xnest (which lacks the
extension).

i've tested this both against a display with (normal X) and without
(Xnest) and it works correctly in both cases.

jacob
-- 
"It drains me, and it shakes me, and hurts like hell everytime I play
it, looking out at thousands of people cheering and smiling, oblivious
to the tragedy of it's meaning, like when you're going to have your
dog put down and it's wagging it's tail on the way there." - Thom Yorke
Index: gdkpango-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkpango-x11.c,v
retrieving revision 1.5
diff -u -r1.5 gdkpango-x11.c
--- gdkpango-x11.c	2001/07/18 04:31:09	1.5
+++ gdkpango-x11.c	2001/09/10 19:22:06
@@ -35,8 +35,11 @@
   if (use_xft == -1)
     {
       const char *val = g_getenv ("GDK_USE_XFT");
+      int event_ret = 0, error_ret = 0;
 
-      use_xft = val && (atoi (val) != 0);
+      use_xft = val && (atoi (val) != 0) && 
+	      XRenderQueryExtension (GDK_DISPLAY (), 
+				     &event_ret, &error_ret);
     }
   
   if (use_xft)


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