summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-04-22 15:46:23 +0000
committerManolo Gouy <Manolo>2016-04-22 15:46:23 +0000
commit3d41fd7c67b62456090cbc641f10b6aa9ec7c388 (patch)
tree23d31fea196eba60ac616e8aee4b166cec952668 /src/drivers/Xlib
parent163c65dc6fb7b776b118c53e93c6a472cd198214 (diff)
Add necessary test of HAVE_X11_XREGION_H when the content of struct _XRegion is needed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11677 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Xlib')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
index a7e548541..445c255c8 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
@@ -53,7 +53,20 @@
# include <FL/Fl_Image_Surface.H>
# include "../../Fl_XColor.H"
# include "../../flstring.h"
-#include <X11/Xregion.h>
+
+#if HAVE_X11_XREGION_H
+# include <X11/Xregion.h>
+#else // if the X11/Xregion.h header is not available, we assume this is the layout of an X11 Region:
+typedef struct {
+ short x1, x2, y1, y2;
+} BOX;
+struct _XRegion {
+ long size;
+ long numRects;
+ BOX *rects;
+ BOX extents;
+};
+#endif // HAVE_X11_XREGION_H
static XImage xi; // template used to pass info to X
static int bytes_per_pixel;