summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2019-05-14 23:48:58 +0200
committerCarlos Garnacho <carlosg@gnome.org>2019-05-15 01:05:20 +0200
commitf3250172a44821ed4325f544f06ba4308ab03b68 (patch)
tree80a21bcd2be5a918f70aab27ea434d5605c31961 /meson.build
parent599806ca82b7b37b9efbbfd4f6e0643d1bbd48fa (diff)
downloadgtk+-f3250172a44821ed4325f544f06ba4308ab03b68.tar.gz
gdk/x11: Make XInput2 a mandatory build time dependency for x11
XInput2 is more than a decade old already, and the input improvements there (and in every other backend really) make it untenable to have support for X11 core input events dragging things behind.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build25
1 files changed, 13 insertions, 12 deletions
diff --git a/meson.build b/meson.build
index bbc5aaee31..2189ee8b61 100644
--- a/meson.build
+++ b/meson.build
@@ -542,18 +542,19 @@ if x11_enabled
cdata.set('HAVE_XGENERICEVENTS', 1)
endif
- if xi_dep.found() and cc.has_header('X11/extensions/XInput2.h', dependencies: xi_dep)
- cdata.set('XINPUT_2', 1)
- # Note that we also check that the XIScrollClassInfo struct is defined,
- # because at least Ubuntu Oneiric seems to have XIAllowTouchEvents(),
- # but not the XIScrollClassInfo struct
- has_allow_touch_evens = cc.has_function('XIAllowTouchEvents', dependencies: xi_dep)
- has_scroll_class_info = cc.has_member('XIScrollClassInfo', 'number', dependencies: xi_dep,
- prefix: '''#include <X11/Xlib.h>
- #include <X11/extensions/XInput2.h>''')
- if has_allow_touch_evens and has_scroll_class_info
- cdata.set('XINPUT_2_2', 1)
- endif
+ if not xi_dep.found() or not cc.has_header('X11/extensions/XInput2.h', dependencies: xi_dep)
+ error('X11 backend enabled, but XInput2 not found.')
+ endif
+
+ # Note that we also check that the XIScrollClassInfo struct is defined,
+ # because at least Ubuntu Oneiric seems to have XIAllowTouchEvents(),
+ # but not the XIScrollClassInfo struct
+ has_allow_touch_evens = cc.has_function('XIAllowTouchEvents', dependencies: xi_dep)
+ has_scroll_class_info = cc.has_member('XIScrollClassInfo', 'number', dependencies: xi_dep,
+ prefix: '''#include <X11/Xlib.h>
+ #include <X11/extensions/XInput2.h>''')
+ if has_allow_touch_evens and has_scroll_class_info
+ cdata.set('XINPUT_2_2', 1)
endif
enable_xinerama = get_option('xinerama')