summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2015-12-30 12:10:15 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2015-12-30 12:10:15 +0000
commit17c48175927a5fa8eea52ef09090617b3e9b20f9 (patch)
treee47fc8bc0f7ad6658b792ccb9dd438a1437073b2 /src
parentbb4f48570835fa21a08d6cfc23f259f3e6779a15 (diff)
Add configure and CMake checks for X11/Xregion.h.
Configure and CMake now both check if X11/Xregion.h exists on the build system and set HAVE_X11_XREGION_H in config.h accordingly. src/Fl_Pixmap.cxx: modified to use the configure test as proposed by Manolo in fltk.coredev on Dec 13 2015 in thread "Using X11 backend on OS X". git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Pixmap.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index a38565ff7..30d51d5a9 100644
--- a/src/Fl_Pixmap.cxx
+++ b/src/Fl_Pixmap.cxx
@@ -33,7 +33,9 @@
#include <FL/Fl_Printer.H>
#if defined(USE_X11)
-# ifdef __APPLE_CC__ // allows using on Darwin + X11 even if X11/Xregion.h is absent
+# 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;
@@ -43,10 +45,8 @@ struct _XRegion {
BOX *rects;
BOX extents;
};
-# else
-# include <X11/Xregion.h>
-# endif
-#endif
+# endif // HAVE_X11_XREGION_H
+#endif // USE_X11
#include <stdio.h>
#include "flstring.h"