Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xinput/dist/src merge xinput 1.6.3
details: https://anonhg.NetBSD.org/xsrc/rev/b07380e823f0
branches: trunk
changeset: 10363:b07380e823f0
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Jul 19 07:29:35 2019 +0000
description:
merge xinput 1.6.3
diffstat:
external/mit/xinput/dist/src/xinput.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diffs (49 lines):
diff -r 900215e1fd5e -r b07380e823f0 external/mit/xinput/dist/src/xinput.c
--- a/external/mit/xinput/dist/src/xinput.c Fri Jul 19 07:29:07 2019 +0000
+++ b/external/mit/xinput/dist/src/xinput.c Fri Jul 19 07:29:35 2019 +0000
@@ -273,7 +273,7 @@
return found;
}
-#ifdef HAVE_XI2
+#if HAVE_XI2
Bool is_pointer(int use)
{
return use == XIMasterPointer || use == XISlavePointer;
@@ -361,6 +361,26 @@
}
}
+static Bool
+is_xwayland(Display *dpy)
+{
+ XDeviceInfo *devices;
+ int n;
+ Bool is_xwayland = False;
+
+ devices = XListInputDevices(dpy, &n);
+ while (n-- > 0) {
+ if (strncmp(devices[n].name, "xwayland-", 9) == 0) {
+ is_xwayland = True;
+ break;
+ }
+ }
+
+ XFreeDeviceList(devices);
+
+ return is_xwayland;
+}
+
int
main(int argc, char * argv[])
{
@@ -402,6 +422,9 @@
goto out;
}
+ if (is_xwayland(display))
+ fprintf(stderr, "WARNING: running xinput against an Xwayland server. See the xinput man page for details.\n");
+
while(driver->func_name) {
if (strcmp(driver->func_name, func) == 0) {
int r = (*driver->func)(display, argc-2, argv+2,
Home |
Main Index |
Thread Index |
Old Index