mirror of https://github.com/fltk/fltk
Detect XRender support
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10622 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
fdab34b20e
commit
a6c4b29a18
1
FL/x.H
1
FL/x.H
|
@ -161,6 +161,7 @@ public:
|
|||
static void x(Fl_Window* wi, int X) {wi->x(X);}
|
||||
static void y(Fl_Window* wi, int Y) {wi->y(Y);}
|
||||
static int ewmh_supported();
|
||||
static int xrender_supported();
|
||||
static void activate_window(Window w);
|
||||
};
|
||||
|
||||
|
|
|
@ -123,6 +123,14 @@
|
|||
|
||||
#define HAVE_XCURSOR 0
|
||||
|
||||
/*
|
||||
* HAVE_XRENDER:
|
||||
*
|
||||
* Do we have the X render library?
|
||||
*/
|
||||
|
||||
#define HAVE_XRENDER 0
|
||||
|
||||
/*
|
||||
* __APPLE_QUARTZ__:
|
||||
*
|
||||
|
|
10
configure.in
10
configure.in
|
@ -1018,6 +1018,16 @@ case $host_os_gui in
|
|||
LIBS="-lXcursor $LIBS")
|
||||
fi
|
||||
|
||||
dnl Check for the Xrender library unless disabled...
|
||||
AC_ARG_ENABLE(xrender, [ --enable-xrender turn on Xrender support [[default=yes]]])
|
||||
|
||||
if test x$enable_xrender != xno; then
|
||||
AC_CHECK_HEADER(X11/extensions/Xrender.h, AC_DEFINE(HAVE_XRENDER),,
|
||||
[#include <X11/Xlib.h>])
|
||||
AC_CHECK_LIB(Xrender, XRenderQueryVersion,
|
||||
LIBS="-lXrender $LIBS")
|
||||
fi
|
||||
|
||||
dnl Check for overlay visuals...
|
||||
AC_PATH_PROG(XPROP, xprop)
|
||||
AC_CACHE_CHECK(for X overlay visuals, ac_cv_have_overlay,
|
||||
|
|
16
src/Fl_x.cxx
16
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) {
|
||||
|
|
Loading…
Reference in New Issue