From a6c4b29a184ce7708819f4706877eedcd99a30f5 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Mon, 16 Mar 2015 11:07:00 +0000 Subject: Detect XRender support git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10622 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_x.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') 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 # endif +# if HAVE_XRENDER +# include +# 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) { -- cgit v1.2.3