diff options
| author | Manolo Gouy <Manolo> | 2016-04-16 09:01:19 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-16 09:01:19 +0000 |
| commit | 083e9ed06aa8c9862abad7eabdcf5ad5782da8eb (patch) | |
| tree | 0a842a11060b30dbcd7b5e8ccb8d157566554b0d /src | |
| parent | f8104524e8e61b5288b162b92fe9d99036ff2418 (diff) | |
Begin moving non window-related member functions out of Fl_X class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11629 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_x.cxx | 19 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx | 6 |
2 files changed, 10 insertions, 15 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 47b984480..cdcbfe4f6 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -40,6 +40,7 @@ # include "drivers/X11/Fl_X11_Screen_Driver.H" # include "drivers/X11/Fl_X11_Window_Driver.H" # include "drivers/X11/Fl_X11_System_Driver.H" +# include "drivers/Xlib/Fl_Xlib_Graphics_Driver.H" # include <unistd.h> # include <time.h> # include <sys/time.h> @@ -2194,17 +2195,17 @@ int Fl_X::ewmh_supported() { return result; } -int Fl_X::xrender_supported() { #if HAVE_XRENDER - static int result = -1; - - if (result == -1) { - fl_open_display(); - - int nop1, nop2; - result = XRenderQueryExtension(fl_display, &nop1, &nop2); - } +static int xrender_supported() { + int nop1, nop2; + fl_open_display(); + return XRenderQueryExtension(fl_display, &nop1, &nop2); +} +#endif +char Fl_Xlib_Graphics_Driver::can_do_alpha_blending() { +#if HAVE_XRENDER + static char result = (char)xrender_supported(); return result; #else return 0; diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx index 98dafbb7e..44d0ad1a5 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx @@ -61,12 +61,6 @@ void Fl_Xlib_Graphics_Driver::gc(void *value) { fl_gc = gc_; } - -char Fl_Xlib_Graphics_Driver::can_do_alpha_blending() { - return Fl_X::xrender_supported(); -} - - void Fl_Xlib_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) { XCopyArea(fl_display, pixmap, fl_window, gc_, srcx, srcy, w, h, x, y); } |
