summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLauri Kasanen <cand@gmx.com>2015-03-16 11:07:00 +0000
committerLauri Kasanen <cand@gmx.com>2015-03-16 11:07:00 +0000
commita6c4b29a184ce7708819f4706877eedcd99a30f5 (patch)
tree80e5a17091bf09191effef946e4c4cd0ae85a17e /src
parentfdab34b20e423ebac430a97f1ddcdae29ba881e0 (diff)
Detect XRender support
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10622 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_x.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 772acae28..8ca25201e 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -69,6 +69,9 @@ static bool have_xfixes = false;
# if HAVE_XCURSOR
# include <X11/Xcursor/Xcursor.h>
# endif
+# if HAVE_XRENDER
+# include <X11/extensions/Xrender.h>
+# endif
static Fl_Xlib_Graphics_Driver fl_xlib_driver;
static Fl_Display_Device fl_xlib_display(&fl_xlib_driver);
Fl_Display_Device *Fl_Display_Device::_display = &fl_xlib_display;// the platform display
@@ -2230,6 +2233,19 @@ int Fl_X::ewmh_supported() {
return result;
}
+int Fl_X::xrender_supported() {
+ static int result = -1;
+
+ if (result == -1) {
+ fl_open_display();
+
+ int nop1, nop2;
+ result = XRenderQueryExtension(fl_display, &nop1, &nop2);
+ }
+
+ return result;
+}
+
extern Fl_Window *fl_xfocus;
void Fl_X::activate_window(Window w) {