@@ -127,7 +127,6 @@ find_file(HAVE_SYS_DIR_H sys/dir.h) | |||||
find_file(HAVE_SYS_NDIR_H sys/ndir.h) | find_file(HAVE_SYS_NDIR_H sys/ndir.h) | ||||
find_file(HAVE_SYS_SELECT_H sys/select.h) | find_file(HAVE_SYS_SELECT_H sys/select.h) | ||||
find_file(HAVE_SYS_STDTYPES_H sys/stdtypes.h) | find_file(HAVE_SYS_STDTYPES_H sys/stdtypes.h) | ||||
find_path(HAVE_XDBE_H Xdbe.h PATH_SUFFIXES X11/extensions extensions) | |||||
mark_as_advanced(HAVE_ALSA_ASOUNDLIB_H HAVE_DIRENT_H HAVE_DLFCN_H) | mark_as_advanced(HAVE_ALSA_ASOUNDLIB_H HAVE_DIRENT_H HAVE_DLFCN_H) | ||||
mark_as_advanced(HAVE_FREETYPE_H HAVE_GL_GL_H HAVE_GL_GLU_H) | mark_as_advanced(HAVE_FREETYPE_H HAVE_GL_GL_H HAVE_GL_GLU_H) | ||||
@@ -135,7 +134,7 @@ mark_as_advanced(HAVE_LIBPNG_PNG_H HAVE_LOCALE_H HAVE_NDIR_H) | |||||
mark_as_advanced(HAVE_OPENGL_GLU_H HAVE_PNG_H HAVE_PTHREAD_H) | mark_as_advanced(HAVE_OPENGL_GLU_H HAVE_PNG_H HAVE_PTHREAD_H) | ||||
mark_as_advanced(HAVE_STDIO_H HAVE_STRINGS_H HAVE_SYS_DIR_H) | mark_as_advanced(HAVE_STDIO_H HAVE_STRINGS_H HAVE_SYS_DIR_H) | ||||
mark_as_advanced(HAVE_SYS_NDIR_H HAVE_SYS_SELECT_H) | mark_as_advanced(HAVE_SYS_NDIR_H HAVE_SYS_SELECT_H) | ||||
mark_as_advanced(HAVE_SYS_STDTYPES_H HAVE_XDBE_H) | |||||
mark_as_advanced(HAVE_SYS_STDTYPES_H) | |||||
# where to find freetype headers | # where to find freetype headers | ||||
find_path(FREETYPE_PATH freetype/config/ftheader.h PATH_SUFFIXES freetype2) | find_path(FREETYPE_PATH freetype/config/ftheader.h PATH_SUFFIXES freetype2) | ||||
@@ -535,18 +534,6 @@ else() | |||||
set(FLTK_XFT_FOUND FALSE) | set(FLTK_XFT_FOUND FALSE) | ||||
endif(OPTION_USE_XFT) | endif(OPTION_USE_XFT) | ||||
####################################################################### | |||||
if(X11_FOUND) | |||||
option(OPTION_USE_XDBE "use lib Xdbe" ON) | |||||
endif(X11_FOUND) | |||||
if(OPTION_USE_XDBE AND HAVE_XDBE_H) | |||||
set(HAVE_XDBE 1) | |||||
set(FLTK_XDBE_FOUND TRUE) | |||||
else() | |||||
set(FLTK_XDBE_FOUND FALSE) | |||||
endif(OPTION_USE_XDBE AND HAVE_XDBE_H) | |||||
####################################################################### | ####################################################################### | ||||
# final setup and config | # final setup and config | ||||
####################################################################### | ####################################################################### | ||||
@@ -127,13 +127,11 @@ LIBNAME="../lib/libfltk.a" | |||||
FLLIBNAME="../lib/libfltk_forms.a" | FLLIBNAME="../lib/libfltk_forms.a" | ||||
GLLIBNAME="../lib/libfltk_gl.a" | GLLIBNAME="../lib/libfltk_gl.a" | ||||
IMGLIBNAME="../lib/libfltk_images.a" | IMGLIBNAME="../lib/libfltk_images.a" | ||||
CAIROLIBNAME="../lib/libfltk_cairo.a" | |||||
LIBBASENAME="libfltk.a" | LIBBASENAME="libfltk.a" | ||||
FLLIBBASENAME="libfltk_forms.a" | FLLIBBASENAME="libfltk_forms.a" | ||||
GLLIBBASENAME="libfltk_gl.a" | GLLIBBASENAME="libfltk_gl.a" | ||||
IMGLIBBASENAME="libfltk_images.a" | IMGLIBBASENAME="libfltk_images.a" | ||||
CAIROLIBBASENAME="libfltk_cairo.a" | |||||
dnl Check for Cairo library unless disabled... | dnl Check for Cairo library unless disabled... | ||||
CAIRODIR="" | CAIRODIR="" | ||||
@@ -154,8 +152,6 @@ if test x$enable_cairoext = xyes; then | |||||
CAIROFLAGS="`pkg-config --cflags cairo`" | CAIROFLAGS="`pkg-config --cflags cairo`" | ||||
CAIROLIBS="-lcairo -lpixman-1" | CAIROLIBS="-lcairo -lpixman-1" | ||||
CXXFLAGS="$CAIROFLAGS $CXXFLAGS" | CXXFLAGS="$CAIROFLAGS $CXXFLAGS" | ||||
LINKFLTKCAIRO="../lib/libfltk_cairo.a" | |||||
FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX" | |||||
LIBS="$CAIROLIBS $LIBS" | LIBS="$CAIROLIBS $LIBS" | ||||
dnl $LINKFLTKCAIRO | dnl $LINKFLTKCAIRO | ||||
LINKFLTK+=" $LINKFLTKCAIRO" | LINKFLTK+=" $LINKFLTKCAIRO" | ||||
@@ -168,8 +164,6 @@ else | |||||
CAIROFLAGS="`pkg-config --cflags cairo`" | CAIROFLAGS="`pkg-config --cflags cairo`" | ||||
CAIROLIBS="-lcairo -lpixman-1" | CAIROLIBS="-lcairo -lpixman-1" | ||||
CXXFLAGS="$CAIROFLAGS $CXXFLAGS" | CXXFLAGS="$CAIROFLAGS $CXXFLAGS" | ||||
LINKFLTKCAIRO="../lib/libfltk_cairo.a" | |||||
FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX" | |||||
fi | fi | ||||
fi | fi | ||||
@@ -226,7 +220,6 @@ if test x$enable_shared = xyes; then | |||||
FLDSONAME="libfltk_forms.$FL_API_VERSION.dylib" | FLDSONAME="libfltk_forms.$FL_API_VERSION.dylib" | ||||
GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib" | GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib" | ||||
IMGDSONAME="libfltk_images.$FL_API_VERSION.dylib" | IMGDSONAME="libfltk_images.$FL_API_VERSION.dylib" | ||||
CAIRODSONAME="libfltk_cairo.$FL_API_VERSION.dylib" | |||||
DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o" | DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o" | ||||
;; | ;; | ||||
@@ -235,7 +228,6 @@ if test x$enable_shared = xyes; then | |||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | ||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | ||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | ||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION" | |||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o" | DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o" | ||||
if test "x$libdir" != "x/usr/lib"; then | if test "x$libdir" != "x/usr/lib"; then | ||||
DSOLINK="-R$libdir" | DSOLINK="-R$libdir" | ||||
@@ -246,7 +238,6 @@ if test x$enable_shared = xyes; then | |||||
FLDSONAME="libfltk_forms.sl.$FL_API_VERSION" | FLDSONAME="libfltk_forms.sl.$FL_API_VERSION" | ||||
GLDSONAME="libfltk_gl.sl.$FL_API_VERSION" | GLDSONAME="libfltk_gl.sl.$FL_API_VERSION" | ||||
IMGDSONAME="libfltk_images.sl.$FL_API_VERSION" | IMGDSONAME="libfltk_images.sl.$FL_API_VERSION" | ||||
CAIRODSONAME="libfltk_cairo.sl.$FL_API_VERSION" | |||||
DSOCOMMAND="ld \$(DSOFLAGS) -b -z +h \$@ $DEBUGFLAG -o" | DSOCOMMAND="ld \$(DSOFLAGS) -b -z +h \$@ $DEBUGFLAG -o" | ||||
if test "x$libdir" != "x/usr/lib"; then | if test "x$libdir" != "x/usr/lib"; then | ||||
DSOLINK="-Wl,-rpath,$libdir" | DSOLINK="-Wl,-rpath,$libdir" | ||||
@@ -257,7 +248,6 @@ if test x$enable_shared = xyes; then | |||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | ||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | ||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | ||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION" | |||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@,-set_version,sgi1.1 \$(LDLIBS) -shared $DEBUGFLAG -o" | DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@,-set_version,sgi1.1 \$(LDLIBS) -shared $DEBUGFLAG -o" | ||||
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"; then | if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"; then | ||||
DSOLINK="-Wl,-rpath,$libdir" | DSOLINK="-Wl,-rpath,$libdir" | ||||
@@ -268,7 +258,6 @@ if test x$enable_shared = xyes; then | |||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | ||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | ||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | ||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION" | |||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o" | DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o" | ||||
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32"; then | if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32"; then | ||||
DSOLINK="-Wl,-rpath,$libdir" | DSOLINK="-Wl,-rpath,$libdir" | ||||
@@ -279,7 +268,6 @@ if test x$enable_shared = xyes; then | |||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | ||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | ||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | ||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION" | |||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o" | DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o" | ||||
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then | if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then | ||||
DSOLINK="-Wl,-rpath,$libdir" | DSOLINK="-Wl,-rpath,$libdir" | ||||
@@ -290,7 +278,6 @@ if test x$enable_shared = xyes; then | |||||
FLDSONAME="libfltk_forms_s.a" | FLDSONAME="libfltk_forms_s.a" | ||||
GLDSONAME="libfltk_gl_s.a" | GLDSONAME="libfltk_gl_s.a" | ||||
IMGDSONAME="libfltk_images_s.a" | IMGDSONAME="libfltk_images_s.a" | ||||
CAIRODSONAME="libfltk_cairo_s.a" | |||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-bexpall,-bM:SRE,-bnoentry -o" | DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-bexpall,-bM:SRE,-bnoentry -o" | ||||
SHAREDSUFFIX="_s" | SHAREDSUFFIX="_s" | ||||
;; | ;; | ||||
@@ -308,7 +295,6 @@ if test x$enable_shared = xyes; then | |||||
FLDSONAME="cygfltk_forms-$FL_API_VERSION.dll" | FLDSONAME="cygfltk_forms-$FL_API_VERSION.dll" | ||||
GLDSONAME="cygfltk_gl-$FL_API_VERSION.dll" | GLDSONAME="cygfltk_gl-$FL_API_VERSION.dll" | ||||
IMGDSONAME="cygfltk_images-$FL_API_VERSION.dll" | IMGDSONAME="cygfltk_images-$FL_API_VERSION.dll" | ||||
CAIRODSONAME="cygfltk_cairo-$FL_API_VERSION.dll" | |||||
else | else | ||||
DSONAME="cygfltknox-$FL_API_VERSION.dll" | DSONAME="cygfltknox-$FL_API_VERSION.dll" | ||||
FLDSONAME="cygfltknox_forms-$FL_API_VERSION.dll" | FLDSONAME="cygfltknox_forms-$FL_API_VERSION.dll" | ||||
@@ -333,7 +319,6 @@ if test x$enable_shared = xyes; then | |||||
FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | FLDSONAME="libfltk_forms.so.$FL_API_VERSION" | ||||
GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | GLDSONAME="libfltk_gl.so.$FL_API_VERSION" | ||||
IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | IMGDSONAME="libfltk_images.so.$FL_API_VERSION" | ||||
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION" | |||||
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o" | DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o" | ||||
;; | ;; | ||||
esac | esac | ||||
@@ -996,16 +981,6 @@ case $uname_GUI in | |||||
fi | fi | ||||
fi | fi | ||||
dnl Check for the Xdbe extension unless disabled... | |||||
AC_ARG_ENABLE(xdbe, [ --enable-xdbe turn on Xdbe support [default=yes]]) | |||||
if test x$enable_xdbe != xno; then | |||||
AC_CHECK_HEADER(X11/extensions/Xdbe.h, AC_DEFINE(HAVE_XDBE),, | |||||
[#include <X11/Xlib.h>]) | |||||
AC_CHECK_LIB(Xext, XdbeQueryExtension, | |||||
LIBS="-lXext $LIBS") | |||||
fi | |||||
dnl Check for overlay visuals... | dnl Check for overlay visuals... | ||||
AC_PATH_PROG(XPROP, xprop) | AC_PATH_PROG(XPROP, xprop) | ||||
AC_CACHE_CHECK(for X overlay visuals, ac_cv_have_overlay, | AC_CACHE_CHECK(for X overlay visuals, ac_cv_have_overlay, | ||||
@@ -1336,9 +1311,6 @@ case $uname_GUI in | |||||
if test x$enable_xft != xno; then | if test x$enable_xft != xno; then | ||||
graphics="$graphics+Xft" | graphics="$graphics+Xft" | ||||
fi | fi | ||||
if test x$enable_xdbe != xno; then | |||||
graphics="$graphics+Xdbe" | |||||
fi | |||||
if test x$enable_xinerama != xno; then | if test x$enable_xinerama != xno; then | ||||
graphics="$graphics+Xinerama" | graphics="$graphics+Xinerama" | ||||
fi | fi | ||||
@@ -85,11 +85,6 @@ if test -d $includedir/FL/images; then | |||||
CXXFLAGS="-I$includedir/FL/images $CXXFLAGS" | CXXFLAGS="-I$includedir/FL/images $CXXFLAGS" | ||||
fi | fi | ||||
if test -f "$libdir/libfltk_cairo.a"; then | |||||
CFLAGS="$CAIROFLAGS $CFLAGS" | |||||
CXXFLAGS="$CAIROFLAGS $CXXFLAGS" | |||||
fi | |||||
# libraries to link with: | # libraries to link with: | ||||
LIBNAME="@LIBNAME@" | LIBNAME="@LIBNAME@" | ||||
DSONAME="@DSONAME@" | DSONAME="@DSONAME@" | ||||
@@ -256,8 +251,8 @@ if test x$use_images = xyes; then | |||||
fi | fi | ||||
if test x$use_cairo = xyes; then | if test x$use_cairo = xyes; then | ||||
LDLIBS="-lfltk_cairo$SHAREDSUFFIX $CAIROLIBS $LDLIBS" | |||||
LDSTATIC="$libdir/libfltk_cairo.a $CAIROLIBS $LDSTATIC" | |||||
LDLIBS="$CAIROLIBS $LDLIBS" | |||||
LDSTATIC="$CAIROLIBS $LDSTATIC" | |||||
fi | fi | ||||
LDLIBS="$DSOLINK $LDFLAGS $libs $LDLIBS" | LDLIBS="$DSOLINK $LDFLAGS $libs $LDLIBS" | ||||
@@ -377,7 +372,7 @@ if test "$echo_libs" = "yes"; then | |||||
fi | fi | ||||
if test x$use_cairo = xyes; then | if test x$use_cairo = xyes; then | ||||
USELIBS="$libdir/libfltk_cairo.a $USELIBS" | |||||
USELIBS="$USELIBS" | |||||
fi | fi | ||||
if test x$use_images = xyes; then | if test x$use_images = xyes; then | ||||
@@ -25,9 +25,6 @@ add_executable(fluid ${CPPFILES}) | |||||
target_link_libraries(fluid fltk fltk_images fltk_forms) | target_link_libraries(fluid fltk fltk_images fltk_forms) | ||||
# link in optional libraries | # link in optional libraries | ||||
if(FLTK_HAVE_CAIRO) | |||||
target_link_libraries(fluid fltk_cairo) | |||||
endif(FLTK_HAVE_CAIRO) | |||||
if(FLTK_USE_GL) | if(FLTK_USE_GL) | ||||
target_link_libraries(fluid fltk_gl) | target_link_libraries(fluid fltk_gl) | ||||
@@ -36,34 +36,6 @@ | |||||
// Fl_Window class will probably do double-buffer and this subclass | // Fl_Window class will probably do double-buffer and this subclass | ||||
// does nothing. | // does nothing. | ||||
#if USE_XDBE | |||||
#include <X11/extensions/Xdbe.h> | |||||
static int use_xdbe; | |||||
static int can_xdbe() { | |||||
static int tried; | |||||
if (!tried) { | |||||
tried = 1; | |||||
int event_base, error_base; | |||||
if (!XdbeQueryExtension(fl_display, &event_base, &error_base)) return 0; | |||||
Drawable root = RootWindow(fl_display,fl_screen); | |||||
int numscreens = 1; | |||||
XdbeScreenVisualInfo *a = XdbeGetVisualInfo(fl_display,&root,&numscreens); | |||||
if (!a) return 0; | |||||
for (int j = 0; j < a->count; j++) { | |||||
if (a->visinfo[j].visual == fl_visual->visualid | |||||
/*&& a->visinfo[j].perflevel > 0*/) { | |||||
use_xdbe = 1; break; | |||||
} | |||||
} | |||||
XdbeFreeVisualInfo(a); | |||||
} | |||||
return use_xdbe; | |||||
} | |||||
#endif | |||||
void Fl_Double_Window::show() { | void Fl_Double_Window::show() { | ||||
Fl_Window::show(); | Fl_Window::show(); | ||||
} | } | ||||
@@ -336,12 +308,6 @@ void Fl_Double_Window::flush(int eraseoverlay) { | |||||
//make_current(); // make sure fl_gc is non-zero | //make_current(); // make sure fl_gc is non-zero | ||||
Fl_X *myi = Fl_X::i(this); | Fl_X *myi = Fl_X::i(this); | ||||
if (!myi->other_xid) { | if (!myi->other_xid) { | ||||
#if USE_XDBE | |||||
if (can_xdbe()) { | |||||
myi->other_xid = XdbeAllocateBackBufferName(fl_display, fl_xid(this), XdbeUndefined); | |||||
myi->backbuffer_bad = 1; | |||||
} else | |||||
#endif | |||||
#if defined(USE_X11) || defined(WIN32) | #if defined(USE_X11) || defined(WIN32) | ||||
myi->other_xid = fl_create_offscreen(w(), h()); | myi->other_xid = fl_create_offscreen(w(), h()); | ||||
clear_damage(FL_DAMAGE_ALL); | clear_damage(FL_DAMAGE_ALL); | ||||
@@ -354,46 +320,6 @@ void Fl_Double_Window::flush(int eraseoverlay) { | |||||
# error unsupported platform | # error unsupported platform | ||||
#endif | #endif | ||||
} | } | ||||
#if USE_XDBE | |||||
if (use_xdbe) { | |||||
if (myi->backbuffer_bad) { | |||||
// Make sure we do a complete redraw... | |||||
if (myi->region) {XDestroyRegion(myi->region); myi->region = 0;} | |||||
clear_damage(FL_DAMAGE_ALL); | |||||
myi->backbuffer_bad = 0; | |||||
} | |||||
XdbeBeginIdiom( fl_display ); | |||||
// Redraw as needed... | |||||
if (damage()) { | |||||
fl_clip_region(myi->region); myi->region = 0; | |||||
fl_window = myi->other_xid; | |||||
#if FLTK_HAVE_CAIRO | |||||
Fl::cairo_set_drawable( this ); | |||||
#endif | |||||
draw(); | |||||
#if FLTK_HAVE_CAIRO | |||||
cairo_surface_flush( myi->cs ); | |||||
#endif | |||||
fl_window = myi->xid; | |||||
} | |||||
// Copy contents of back buffer to window... | |||||
XdbeSwapInfo s; | |||||
s.swap_window = myi->xid; | |||||
s.swap_action = XdbeUndefined; | |||||
XdbeSwapBuffers(fl_display, &s, 1); | |||||
XdbeEndIdiom( fl_display ); | |||||
return; | |||||
} else | |||||
#endif | |||||
fl_clip_region(myi->region); | fl_clip_region(myi->region); | ||||
@@ -433,7 +359,9 @@ void Fl_Double_Window::flush(int eraseoverlay) { | |||||
fl_window = myi->xid; | fl_window = myi->xid; | ||||
#if FLTK_HAVE_CAIRO | |||||
Fl::cairo_set_drawable( this ); | Fl::cairo_set_drawable( this ); | ||||
#endif | |||||
fl_clip_region(myi->region); | fl_clip_region(myi->region); | ||||
@@ -442,9 +370,6 @@ void Fl_Double_Window::flush(int eraseoverlay) { | |||||
if (eraseoverlay) fl_clip_region(0); | if (eraseoverlay) fl_clip_region(0); | ||||
// on Irix (at least) it is faster to reduce the area copied to | // on Irix (at least) it is faster to reduce the area copied to | ||||
// the current clip region: | // the current clip region: | ||||
#if USE_XDBE | |||||
if ( !use_xdbe ) | |||||
#endif | |||||
{ | { | ||||
int X,Y,W,H; fl_clip_box(0,0,w(),h(),X,Y,W,H); | int X,Y,W,H; fl_clip_box(0,0,w(),h(),X,Y,W,H); | ||||
if (myi->other_xid) fl_copy_offscreen(X, Y, W, H, myi->other_xid, X, Y); | if (myi->other_xid) fl_copy_offscreen(X, Y, W, H, myi->other_xid, X, Y); | ||||
@@ -458,15 +383,6 @@ void Fl_Double_Window::resize(int X,int Y,int W,int H) { | |||||
int ow = w(); | int ow = w(); | ||||
int oh = h(); | int oh = h(); | ||||
Fl_Window::resize(X,Y,W,H); | Fl_Window::resize(X,Y,W,H); | ||||
#if USE_XDBE | |||||
if (use_xdbe) { | |||||
Fl_X* myi = Fl_X::i(this); | |||||
if (myi && myi->other_xid && ( ow != w() || oh != h() ) ) { | |||||
myi->backbuffer_bad = 1; | |||||
} | |||||
return; | |||||
} | |||||
#endif | |||||
Fl_X* myi = Fl_X::i(this); | Fl_X* myi = Fl_X::i(this); | ||||
if (myi && myi->other_xid && (ow != w() || oh != h())) { | if (myi && myi->other_xid && (ow != w() || oh != h())) { | ||||
fl_delete_offscreen(myi->other_xid); | fl_delete_offscreen(myi->other_xid); | ||||
@@ -477,9 +393,6 @@ void Fl_Double_Window::resize(int X,int Y,int W,int H) { | |||||
void Fl_Double_Window::hide() { | void Fl_Double_Window::hide() { | ||||
Fl_X* myi = Fl_X::i(this); | Fl_X* myi = Fl_X::i(this); | ||||
if (myi && myi->other_xid) { | if (myi && myi->other_xid) { | ||||
#if USE_XDBE | |||||
if (!use_xdbe) | |||||
#endif | |||||
fl_delete_offscreen(myi->other_xid); | fl_delete_offscreen(myi->other_xid); | ||||
} | } | ||||
Fl_Window::hide(); | Fl_Window::hide(); | ||||
@@ -84,10 +84,6 @@ int Fl::visual(int flags) { | |||||
#else | #else | ||||
#if USE_XDBE | |||||
#include <X11/extensions/Xdbe.h> | |||||
#endif | |||||
static int test_visual(XVisualInfo& v, int flags) { | static int test_visual(XVisualInfo& v, int flags) { | ||||
if (v.screen != fl_screen) return 0; | if (v.screen != fl_screen) return 0; | ||||
#if USE_COLORMAP | #if USE_COLORMAP | ||||
@@ -103,31 +99,11 @@ static int test_visual(XVisualInfo& v, int flags) { | |||||
#else | #else | ||||
// simpler if we can't use colormapped visuals at all: | // simpler if we can't use colormapped visuals at all: | ||||
if (v.c_class != StaticColor && v.c_class != TrueColor) return 0; | if (v.c_class != StaticColor && v.c_class != TrueColor) return 0; | ||||
#endif | |||||
#if USE_XDBE | |||||
if (flags & FL_DOUBLE) { | |||||
static XdbeScreenVisualInfo *xdbejunk; | |||||
if (!xdbejunk) { | |||||
int event_base, error_base; | |||||
if (!XdbeQueryExtension(fl_display, &event_base, &error_base)) return 0; | |||||
Drawable root = RootWindow(fl_display,fl_screen); | |||||
int numscreens = 1; | |||||
xdbejunk = XdbeGetVisualInfo(fl_display,&root,&numscreens); | |||||
if (!xdbejunk) return 0; | |||||
} | |||||
for (int j = 0; ; j++) { | |||||
if (j >= xdbejunk->count) return 0; | |||||
if (xdbejunk->visinfo[j].visual == v.visualid) break; | |||||
} | |||||
} | |||||
#endif | #endif | ||||
return 1; | return 1; | ||||
} | } | ||||
int Fl::visual(int flags) { | int Fl::visual(int flags) { | ||||
#if USE_XDBE == 0 | |||||
if (flags & FL_DOUBLE) return 0; | |||||
#endif | |||||
fl_open_display(); | fl_open_display(); | ||||
// always use default if possible: | // always use default if possible: | ||||
if (test_visual(*fl_visual, flags)) return 1; | if (test_visual(*fl_visual, flags)) return 1; | ||||