diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-07-27 07:57:27 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-07-27 07:57:27 +0000 |
commit | d4a0bed4b91da9de86c311c7fef9a8aa9a6f500c (patch) | |
tree | a1b439049dee87bc951e190db93f5bbe8b43b0b5 /xserver/Xi | |
parent | b6bc775539a31f663f9e22ce3ccaf0aa96adf3b6 (diff) |
Update to xserver 1.20.5. Tested by jsg@
Diffstat (limited to 'xserver/Xi')
52 files changed, 138 insertions, 109 deletions
diff --git a/xserver/Xi/Makefile.in b/xserver/Xi/Makefile.in index 61e4a5d7d..05fed0c06 100644 --- a/xserver/Xi/Makefile.in +++ b/xserver/Xi/Makefile.in @@ -68,7 +68,7 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/xwayland-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -321,6 +321,7 @@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ +SCANNER_ARG = @SCANNER_ARG@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ @@ -339,15 +340,18 @@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@ +WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@ +WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@ WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@ WAYLAND_SCANNER = @WAYLAND_SCANNER@ +WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@ +WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ @@ -355,6 +359,8 @@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XCONFIGDIR = @XCONFIGDIR@ +XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ @@ -426,8 +432,6 @@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ -__XCONFIGDIR__ = @__XCONFIGDIR__@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ diff --git a/xserver/Xi/allowev.c b/xserver/Xi/allowev.c index 770fe9fd8..c25edb3bf 100644 --- a/xserver/Xi/allowev.c +++ b/xserver/Xi/allowev.c @@ -69,7 +69,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXAllowDeviceEvents(ClientPtr client) { REQUEST(xAllowDeviceEventsReq); diff --git a/xserver/Xi/chgdctl.c b/xserver/Xi/chgdctl.c index b3ee867f0..a778fa380 100644 --- a/xserver/Xi/chgdctl.c +++ b/xserver/Xi/chgdctl.c @@ -71,7 +71,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXChangeDeviceControl(ClientPtr client) { xDeviceCtl *ctl; @@ -247,7 +247,7 @@ ProcXChangeDeviceControl(ClientPtr client) * */ -void +void _X_COLD SRepXChangeDeviceControl(ClientPtr client, int size, xChangeDeviceControlReply * rep) { diff --git a/xserver/Xi/chgfctl.c b/xserver/Xi/chgfctl.c index 224c2ba0a..1de4da9ef 100644 --- a/xserver/Xi/chgfctl.c +++ b/xserver/Xi/chgfctl.c @@ -71,7 +71,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXChangeFeedbackControl(ClientPtr client) { REQUEST(xChangeFeedbackControlReq); diff --git a/xserver/Xi/chgkbd.c b/xserver/Xi/chgkbd.c index ea91eb371..4f5abd731 100644 --- a/xserver/Xi/chgkbd.c +++ b/xserver/Xi/chgkbd.c @@ -72,7 +72,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXChangeKeyboardDevice(ClientPtr client) { REQUEST(xChangeKeyboardDeviceReq); diff --git a/xserver/Xi/chgkmap.c b/xserver/Xi/chgkmap.c index 49660f944..befe6e7ae 100644 --- a/xserver/Xi/chgkmap.c +++ b/xserver/Xi/chgkmap.c @@ -69,7 +69,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXChangeDeviceKeyMapping(ClientPtr client) { unsigned int count; diff --git a/xserver/Xi/chgprop.c b/xserver/Xi/chgprop.c index 84fb51dcb..1d72770f1 100644 --- a/xserver/Xi/chgprop.c +++ b/xserver/Xi/chgprop.c @@ -71,7 +71,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXChangeDeviceDontPropagateList(ClientPtr client) { REQUEST(xChangeDeviceDontPropagateListReq); diff --git a/xserver/Xi/chgptr.c b/xserver/Xi/chgptr.c index f99d1aaea..06047a62a 100644 --- a/xserver/Xi/chgptr.c +++ b/xserver/Xi/chgptr.c @@ -74,7 +74,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXChangePointerDevice(ClientPtr client) { REQUEST(xChangePointerDeviceReq); diff --git a/xserver/Xi/closedev.c b/xserver/Xi/closedev.c index 154e6ce08..199d38a5a 100644 --- a/xserver/Xi/closedev.c +++ b/xserver/Xi/closedev.c @@ -70,7 +70,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXCloseDevice(ClientPtr client) { REQUEST(xCloseDeviceReq); diff --git a/xserver/Xi/devbell.c b/xserver/Xi/devbell.c index 07865d270..2e2a348f9 100644 --- a/xserver/Xi/devbell.c +++ b/xserver/Xi/devbell.c @@ -68,7 +68,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXDeviceBell(ClientPtr client) { REQUEST(xDeviceBellReq); diff --git a/xserver/Xi/extinit.c b/xserver/Xi/extinit.c index 7a86ee2e7..33dacbeb4 100644 --- a/xserver/Xi/extinit.c +++ b/xserver/Xi/extinit.c @@ -407,7 +407,7 @@ ProcIDispatch(ClientPtr client) * */ -static int +static int _X_COLD SProcIDispatch(ClientPtr client) { REQUEST(xReq); @@ -425,7 +425,7 @@ SProcIDispatch(ClientPtr client) * */ -static void +static void _X_COLD SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) { /* All we look at is the type field */ @@ -859,7 +859,7 @@ SBarrierEvent(xXIBarrierEvent * from, } /** Event swapping function for XI2 events. */ -void +void _X_COLD XI2EventSwap(xGenericEvent *from, xGenericEvent *to) { switch (from->evtype) { @@ -1202,7 +1202,7 @@ MakeDeviceTypeAtoms(void) */ #define DO_SWAP(func,type) func ((type *)from, (type *)to) -static void +static void _X_COLD SEventIDispatch(xEvent *from, xEvent *to) { int type = from->u.u.type & 0177; diff --git a/xserver/Xi/getbmap.c b/xserver/Xi/getbmap.c index 49b868889..ce3e9e60b 100644 --- a/xserver/Xi/getbmap.c +++ b/xserver/Xi/getbmap.c @@ -67,7 +67,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGetDeviceButtonMapping(ClientPtr client) { REQUEST(xGetDeviceButtonMappingReq); @@ -122,7 +122,7 @@ ProcXGetDeviceButtonMapping(ClientPtr client) * */ -void +void _X_COLD SRepXGetDeviceButtonMapping(ClientPtr client, int size, xGetDeviceButtonMappingReply * rep) { diff --git a/xserver/Xi/getdctl.c b/xserver/Xi/getdctl.c index 6f73e0979..149f5e14e 100644 --- a/xserver/Xi/getdctl.c +++ b/xserver/Xi/getdctl.c @@ -68,7 +68,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGetDeviceControl(ClientPtr client) { REQUEST(xGetDeviceControlReq); @@ -153,7 +153,7 @@ CopySwapDeviceEnable(ClientPtr client, DeviceIntPtr dev, char *buf) * */ -void +void _X_COLD SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/getfctl.c b/xserver/Xi/getfctl.c index 599b2ef97..eea0113c1 100644 --- a/xserver/Xi/getfctl.c +++ b/xserver/Xi/getfctl.c @@ -68,7 +68,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGetFeedbackControl(ClientPtr client) { REQUEST(xGetFeedbackControlReq); @@ -258,7 +258,7 @@ CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf) * */ -void +void _X_COLD SRepXGetFeedbackControl(ClientPtr client, int size, xGetFeedbackControlReply * rep) { diff --git a/xserver/Xi/getfocus.c b/xserver/Xi/getfocus.c index 40546cb84..cf8e02449 100644 --- a/xserver/Xi/getfocus.c +++ b/xserver/Xi/getfocus.c @@ -68,7 +68,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGetDeviceFocus(ClientPtr client) { REQUEST(xGetDeviceFocusReq); @@ -130,7 +130,7 @@ ProcXGetDeviceFocus(ClientPtr client) * */ -void +void _X_COLD SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/getkmap.c b/xserver/Xi/getkmap.c index 87c197759..c6db2cee2 100644 --- a/xserver/Xi/getkmap.c +++ b/xserver/Xi/getkmap.c @@ -71,7 +71,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGetDeviceKeyMapping(ClientPtr client) { REQUEST(xGetDeviceKeyMappingReq); @@ -146,7 +146,7 @@ ProcXGetDeviceKeyMapping(ClientPtr client) * */ -void +void _X_COLD SRepXGetDeviceKeyMapping(ClientPtr client, int size, xGetDeviceKeyMappingReply * rep) { diff --git a/xserver/Xi/getmmap.c b/xserver/Xi/getmmap.c index f07f2bb5c..19d8eb221 100644 --- a/xserver/Xi/getmmap.c +++ b/xserver/Xi/getmmap.c @@ -68,7 +68,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGetDeviceModifierMapping(ClientPtr client) { REQUEST(xGetDeviceModifierMappingReq); @@ -125,7 +125,7 @@ ProcXGetDeviceModifierMapping(ClientPtr client) * */ -void +void _X_COLD SRepXGetDeviceModifierMapping(ClientPtr client, int size, xGetDeviceModifierMappingReply * rep) { diff --git a/xserver/Xi/getprop.c b/xserver/Xi/getprop.c index 19f18af21..b744f35cb 100644 --- a/xserver/Xi/getprop.c +++ b/xserver/Xi/getprop.c @@ -72,7 +72,7 @@ extern int ExtEventIndex; * */ -int +int _X_COLD SProcXGetDeviceDontPropagateList(ClientPtr client) { REQUEST(xGetDeviceDontPropagateListReq); @@ -173,7 +173,7 @@ XEventClass * */ -void +void _X_COLD SRepXGetDeviceDontPropagateList(ClientPtr client, int size, xGetDeviceDontPropagateListReply * rep) { diff --git a/xserver/Xi/getselev.c b/xserver/Xi/getselev.c index 60a46c2d1..0623c7ac4 100644 --- a/xserver/Xi/getselev.c +++ b/xserver/Xi/getselev.c @@ -70,7 +70,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGetSelectedExtensionEvents(ClientPtr client) { REQUEST(xGetSelectedExtensionEventsReq); @@ -164,7 +164,7 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) * */ -void +void _X_COLD SRepXGetSelectedExtensionEvents(ClientPtr client, int size, xGetSelectedExtensionEventsReply * rep) { diff --git a/xserver/Xi/getvers.c b/xserver/Xi/getvers.c index 829e69535..a56ff1684 100644 --- a/xserver/Xi/getvers.c +++ b/xserver/Xi/getvers.c @@ -70,7 +70,7 @@ XExtensionVersion XIVersion; * */ -int +int _X_COLD SProcXGetExtensionVersion(ClientPtr client) { REQUEST(xGetExtensionVersionReq); @@ -120,7 +120,7 @@ ProcXGetExtensionVersion(ClientPtr client) * */ -void +void _X_COLD SRepXGetExtensionVersion(ClientPtr client, int size, xGetExtensionVersionReply * rep) { diff --git a/xserver/Xi/grabdev.c b/xserver/Xi/grabdev.c index 090043814..eb4f9bfde 100644 --- a/xserver/Xi/grabdev.c +++ b/xserver/Xi/grabdev.c @@ -72,7 +72,7 @@ extern int ExtEventIndex; * */ -int +int _X_COLD SProcXGrabDevice(ClientPtr client) { REQUEST(xGrabDeviceReq); @@ -205,7 +205,7 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count, * */ -void +void _X_COLD SRepXGrabDevice(ClientPtr client, int size, xGrabDeviceReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/grabdevb.c b/xserver/Xi/grabdevb.c index 8b4ae698e..a2f7eb395 100644 --- a/xserver/Xi/grabdevb.c +++ b/xserver/Xi/grabdevb.c @@ -71,7 +71,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGrabDeviceButton(ClientPtr client) { REQUEST(xGrabDeviceButtonReq); diff --git a/xserver/Xi/grabdevk.c b/xserver/Xi/grabdevk.c index 8694f9e6d..e856fa82c 100644 --- a/xserver/Xi/grabdevk.c +++ b/xserver/Xi/grabdevk.c @@ -71,7 +71,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGrabDeviceKey(ClientPtr client) { REQUEST(xGrabDeviceKeyReq); diff --git a/xserver/Xi/gtmotion.c b/xserver/Xi/gtmotion.c index cde5351a6..7c6684996 100644 --- a/xserver/Xi/gtmotion.c +++ b/xserver/Xi/gtmotion.c @@ -68,7 +68,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXGetDeviceMotionEvents(ClientPtr client) { REQUEST(xGetDeviceMotionEventsReq); @@ -162,7 +162,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) * */ -void +void _X_COLD SRepXGetDeviceMotionEvents(ClientPtr client, int size, xGetDeviceMotionEventsReply * rep) { diff --git a/xserver/Xi/listdev.c b/xserver/Xi/listdev.c index 6a10091d0..c15e61b37 100644 --- a/xserver/Xi/listdev.c +++ b/xserver/Xi/listdev.c @@ -74,7 +74,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXListInputDevices(ClientPtr client) { REQUEST(xListInputDevicesReq); @@ -413,7 +413,7 @@ ProcXListInputDevices(ClientPtr client) * */ -void +void _X_COLD SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/opendev.c b/xserver/Xi/opendev.c index 6708bade1..3472c97dd 100644 --- a/xserver/Xi/opendev.c +++ b/xserver/Xi/opendev.c @@ -73,7 +73,7 @@ extern CARD8 event_base[]; * */ -int +int _X_COLD SProcXOpenDevice(ClientPtr client) { REQUEST(xOpenDeviceReq); @@ -163,7 +163,7 @@ ProcXOpenDevice(ClientPtr client) * */ -void +void _X_COLD SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/queryst.c b/xserver/Xi/queryst.c index 04a652be3..6c9d66606 100644 --- a/xserver/Xi/queryst.c +++ b/xserver/Xi/queryst.c @@ -53,7 +53,7 @@ from The Open Group. * */ -int +int _X_COLD SProcXQueryDeviceState(ClientPtr client) { REQUEST(xQueryDeviceStateReq); @@ -179,7 +179,7 @@ ProcXQueryDeviceState(ClientPtr client) * */ -void +void _X_COLD SRepXQueryDeviceState(ClientPtr client, int size, xQueryDeviceStateReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/selectev.c b/xserver/Xi/selectev.c index 284bd29e5..b9b8112aa 100644 --- a/xserver/Xi/selectev.c +++ b/xserver/Xi/selectev.c @@ -119,7 +119,7 @@ HandleDevicePresenceMask(ClientPtr client, WindowPtr win, * */ -int +int _X_COLD SProcXSelectExtensionEvent(ClientPtr client) { REQUEST(xSelectExtensionEventReq); diff --git a/xserver/Xi/sendexev.c b/xserver/Xi/sendexev.c index 5ecc228ee..5c2e0fc56 100644 --- a/xserver/Xi/sendexev.c +++ b/xserver/Xi/sendexev.c @@ -73,7 +73,7 @@ extern int lastEvent; /* Defined in extension.c */ * */ -int +int _X_COLD SProcXSendExtensionEvent(ClientPtr client) { CARD32 *p; diff --git a/xserver/Xi/setbmap.c b/xserver/Xi/setbmap.c index 94796558d..f94db861d 100644 --- a/xserver/Xi/setbmap.c +++ b/xserver/Xi/setbmap.c @@ -68,7 +68,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXSetDeviceButtonMapping(ClientPtr client) { REQUEST(xSetDeviceButtonMappingReq); @@ -130,7 +130,7 @@ ProcXSetDeviceButtonMapping(ClientPtr client) * */ -void +void _X_COLD SRepXSetDeviceButtonMapping(ClientPtr client, int size, xSetDeviceButtonMappingReply * rep) { diff --git a/xserver/Xi/setdval.c b/xserver/Xi/setdval.c index 463e4f38c..e57cb259d 100644 --- a/xserver/Xi/setdval.c +++ b/xserver/Xi/setdval.c @@ -68,7 +68,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXSetDeviceValuators(ClientPtr client) { REQUEST(xSetDeviceValuatorsReq); @@ -137,7 +137,7 @@ ProcXSetDeviceValuators(ClientPtr client) * */ -void +void _X_COLD SRepXSetDeviceValuators(ClientPtr client, int size, xSetDeviceValuatorsReply * rep) { diff --git a/xserver/Xi/setfocus.c b/xserver/Xi/setfocus.c index 809184189..8ca19d520 100644 --- a/xserver/Xi/setfocus.c +++ b/xserver/Xi/setfocus.c @@ -71,7 +71,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXSetDeviceFocus(ClientPtr client) { REQUEST(xSetDeviceFocusReq); diff --git a/xserver/Xi/setmmap.c b/xserver/Xi/setmmap.c index 1320cfec7..d60096a5a 100644 --- a/xserver/Xi/setmmap.c +++ b/xserver/Xi/setmmap.c @@ -70,7 +70,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXSetDeviceModifierMapping(ClientPtr client) { REQUEST(xSetDeviceModifierMappingReq); @@ -136,7 +136,7 @@ ProcXSetDeviceModifierMapping(ClientPtr client) * */ -void +void _X_COLD SRepXSetDeviceModifierMapping(ClientPtr client, int size, xSetDeviceModifierMappingReply * rep) { diff --git a/xserver/Xi/setmode.c b/xserver/Xi/setmode.c index 5ed09136e..e7e12d4e0 100644 --- a/xserver/Xi/setmode.c +++ b/xserver/Xi/setmode.c @@ -68,7 +68,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXSetDeviceMode(ClientPtr client) { REQUEST(xSetDeviceModeReq); @@ -138,7 +138,7 @@ ProcXSetDeviceMode(ClientPtr client) * */ -void +void _X_COLD SRepXSetDeviceMode(ClientPtr client, int size, xSetDeviceModeReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/ungrdev.c b/xserver/Xi/ungrdev.c index 162a00abf..fd4fc0f45 100644 --- a/xserver/Xi/ungrdev.c +++ b/xserver/Xi/ungrdev.c @@ -67,7 +67,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXUngrabDevice(ClientPtr client) { REQUEST(xUngrabDeviceReq); diff --git a/xserver/Xi/ungrdevb.c b/xserver/Xi/ungrdevb.c index b02510ea0..47b97d716 100644 --- a/xserver/Xi/ungrdevb.c +++ b/xserver/Xi/ungrdevb.c @@ -73,7 +73,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXUngrabDeviceButton(ClientPtr client) { REQUEST(xUngrabDeviceButtonReq); diff --git a/xserver/Xi/ungrdevk.c b/xserver/Xi/ungrdevk.c index f98117168..753b14d70 100644 --- a/xserver/Xi/ungrdevk.c +++ b/xserver/Xi/ungrdevk.c @@ -75,7 +75,7 @@ SOFTWARE. * */ -int +int _X_COLD SProcXUngrabDeviceKey(ClientPtr client) { REQUEST(xUngrabDeviceKeyReq); diff --git a/xserver/Xi/xiallowev.c b/xserver/Xi/xiallowev.c index ca263ef1f..676480157 100644 --- a/xserver/Xi/xiallowev.c +++ b/xserver/Xi/xiallowev.c @@ -44,7 +44,7 @@ #include "exevents.h" #include "xiallowev.h" -int +int _X_COLD SProcXIAllowEvents(ClientPtr client) { REQUEST(xXIAllowEventsReq); diff --git a/xserver/Xi/xibarriers.c b/xserver/Xi/xibarriers.c index b0a4a92a1..1926762ad 100644 --- a/xserver/Xi/xibarriers.c +++ b/xserver/Xi/xibarriers.c @@ -611,7 +611,9 @@ CreatePointerBarrierClient(ClientPtr client, } pbd->deviceid = dev->id; + input_lock(); xorg_list_add(&pbd->entry, &ret->per_device); + input_unlock(); } ret->id = stuff->barrier; @@ -626,7 +628,9 @@ CreatePointerBarrierClient(ClientPtr client, ret->barrier.directions &= ~(BarrierPositiveX | BarrierNegativeX); if (barrier_is_vertical(&ret->barrier)) ret->barrier.directions &= ~(BarrierPositiveY | BarrierNegativeY); + input_lock(); xorg_list_add(&ret->entry, &cs->barriers); + input_unlock(); *client_out = ret; return Success; @@ -689,7 +693,9 @@ BarrierFreeBarrier(void *data, XID id) mieqEnqueue(dev, (InternalEvent *) &ev); } + input_lock(); xorg_list_del(&c->entry); + input_unlock(); FreePointerBarrierClient(c); return Success; @@ -709,7 +715,9 @@ static void add_master_func(void *res, XID id, void *devid) pbd = AllocBarrierDevice(); pbd->deviceid = *deviceid; + input_lock(); xorg_list_add(&pbd->entry, &barrier->per_device); + input_unlock(); } static void remove_master_func(void *res, XID id, void *devid) @@ -752,7 +760,9 @@ static void remove_master_func(void *res, XID id, void *devid) mieqEnqueue(dev, (InternalEvent *) &ev); } + input_lock(); xorg_list_del(&pbd->entry); + input_unlock(); free(pbd); } @@ -823,7 +833,7 @@ XIDestroyPointerBarrier(ClientPtr client, return Success; } -int +int _X_COLD SProcXIBarrierReleasePointer(ClientPtr client) { xXIBarrierReleasePointerInfo *info; diff --git a/xserver/Xi/xichangecursor.c b/xserver/Xi/xichangecursor.c index 8e6255b6e..a9a1ac9fc 100644 --- a/xserver/Xi/xichangecursor.c +++ b/xserver/Xi/xichangecursor.c @@ -53,7 +53,7 @@ * */ -int +int _X_COLD SProcXIChangeCursor(ClientPtr client) { REQUEST(xXIChangeCursorReq); diff --git a/xserver/Xi/xichangehierarchy.c b/xserver/Xi/xichangehierarchy.c index 7286eff55..cbdd91258 100644 --- a/xserver/Xi/xichangehierarchy.c +++ b/xserver/Xi/xichangehierarchy.c @@ -127,7 +127,7 @@ XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) * */ -int +int _X_COLD SProcXIChangeHierarchy(ClientPtr client) { REQUEST(xXIChangeHierarchyReq); diff --git a/xserver/Xi/xigetclientpointer.c b/xserver/Xi/xigetclientpointer.c index 306dd396b..c3d494d61 100644 --- a/xserver/Xi/xigetclientpointer.c +++ b/xserver/Xi/xigetclientpointer.c @@ -46,7 +46,7 @@ * setting. */ -int +int _X_COLD SProcXIGetClientPointer(ClientPtr client) { REQUEST(xXIGetClientPointerReq); @@ -96,7 +96,7 @@ ProcXIGetClientPointer(ClientPtr client) * */ -void +void _X_COLD SRepXIGetClientPointer(ClientPtr client, int size, xXIGetClientPointerReply * rep) { diff --git a/xserver/Xi/xigrabdev.c b/xserver/Xi/xigrabdev.c index e2a2ae333..cf3ee7b95 100644 --- a/xserver/Xi/xigrabdev.c +++ b/xserver/Xi/xigrabdev.c @@ -43,7 +43,7 @@ #include "xigrabdev.h" #include "inpututils.h" -int +int _X_COLD SProcXIGrabDevice(ClientPtr client) { REQUEST(xXIGrabDeviceReq); @@ -132,7 +132,7 @@ ProcXIGrabDevice(ClientPtr client) return ret; } -int +int _X_COLD SProcXIUngrabDevice(ClientPtr client) { REQUEST(xXIUngrabDeviceReq); @@ -171,7 +171,7 @@ ProcXIUngrabDevice(ClientPtr client) return Success; } -void +void _X_COLD SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/xipassivegrab.c b/xserver/Xi/xipassivegrab.c index 9241ffdea..65d5870f6 100644 --- a/xserver/Xi/xipassivegrab.c +++ b/xserver/Xi/xipassivegrab.c @@ -46,7 +46,7 @@ #include "misc.h" #include "inpututils.h" -int +int _X_COLD SProcXIPassiveGrabDevice(ClientPtr client) { int i; @@ -88,7 +88,7 @@ ProcXIPassiveGrabDevice(ClientPtr client) }; int i, ret = Success; uint32_t *modifiers; - xXIGrabModifierInfo *modifiers_failed; + xXIGrabModifierInfo *modifiers_failed = NULL; GrabMask mask = { 0 }; GrabParameters param; void *tmp; @@ -232,13 +232,13 @@ ProcXIPassiveGrabDevice(ClientPtr client) if (rep.num_modifiers) WriteToClient(client, rep.length * 4, modifiers_failed); - free(modifiers_failed); out: + free(modifiers_failed); xi2mask_free(&mask.xi2mask); return ret; } -void +void _X_COLD SRepXIPassiveGrabDevice(ClientPtr client, int size, xXIPassiveGrabDeviceReply * rep) { @@ -249,7 +249,7 @@ SRepXIPassiveGrabDevice(ClientPtr client, int size, WriteToClient(client, size, rep); } -int +int _X_COLD SProcXIPassiveUngrabDevice(ClientPtr client) { int i; diff --git a/xserver/Xi/xiproperty.c b/xserver/Xi/xiproperty.c index b7a1f59f4..6ec419e87 100644 --- a/xserver/Xi/xiproperty.c +++ b/xserver/Xi/xiproperty.c @@ -372,8 +372,7 @@ XIGetKnownProperty(const char *name) if (!name) return None; - for (i = 0; i < (sizeof(dev_properties) / sizeof(struct dev_properties)); - i++) { + for (i = 0; i < ARRAY_SIZE(dev_properties); i++) { if (strcmp(name, dev_properties[i].name) == 0) { if (dev_properties[i].type == None) { dev_properties[i].type = @@ -393,8 +392,7 @@ XIResetProperties(void) { int i; - for (i = 0; i < (sizeof(dev_properties) / sizeof(struct dev_properties)); - i++) + for (i = 0; i < ARRAY_SIZE(dev_properties); i++) dev_properties[i].type = None; } @@ -1013,7 +1011,7 @@ ProcXGetDeviceProperty(ClientPtr client) return Success; } -int +int _X_COLD SProcXListDeviceProperties(ClientPtr client) { REQUEST(xListDevicePropertiesReq); @@ -1023,7 +1021,7 @@ SProcXListDeviceProperties(ClientPtr client) return (ProcXListDeviceProperties(client)); } -int +int _X_COLD SProcXChangeDeviceProperty(ClientPtr client) { REQUEST(xChangeDevicePropertyReq); @@ -1036,7 +1034,7 @@ SProcXChangeDeviceProperty(ClientPtr client) return (ProcXChangeDeviceProperty(client)); } -int +int _X_COLD SProcXDeleteDeviceProperty(ClientPtr client) { REQUEST(xDeleteDevicePropertyReq); @@ -1047,7 +1045,7 @@ SProcXDeleteDeviceProperty(ClientPtr client) return (ProcXDeleteDeviceProperty(client)); } -int +int _X_COLD SProcXGetDeviceProperty(ClientPtr client) { REQUEST(xGetDevicePropertyReq); @@ -1063,7 +1061,7 @@ SProcXGetDeviceProperty(ClientPtr client) /* Reply swapping */ -void +void _X_COLD SRepXListDeviceProperties(ClientPtr client, int size, xListDevicePropertiesReply * rep) { @@ -1074,7 +1072,7 @@ SRepXListDeviceProperties(ClientPtr client, int size, WriteToClient(client, size, rep); } -void +void _X_COLD SRepXGetDeviceProperty(ClientPtr client, int size, xGetDevicePropertyReply * rep) { @@ -1252,7 +1250,7 @@ ProcXIGetProperty(ClientPtr client) return Success; } -int +int _X_COLD SProcXIListProperties(ClientPtr client) { REQUEST(xXIListPropertiesReq); @@ -1263,7 +1261,7 @@ SProcXIListProperties(ClientPtr client) return (ProcXIListProperties(client)); } -int +int _X_COLD SProcXIChangeProperty(ClientPtr client) { REQUEST(xXIChangePropertyReq); @@ -1277,7 +1275,7 @@ SProcXIChangeProperty(ClientPtr client) return (ProcXIChangeProperty(client)); } -int +int _X_COLD SProcXIDeleteProperty(ClientPtr client) { REQUEST(xXIDeletePropertyReq); @@ -1289,7 +1287,7 @@ SProcXIDeleteProperty(ClientPtr client) return (ProcXIDeleteProperty(client)); } -int +int _X_COLD SProcXIGetProperty(ClientPtr client) { REQUEST(xXIGetPropertyReq); @@ -1304,7 +1302,7 @@ SProcXIGetProperty(ClientPtr client) return (ProcXIGetProperty(client)); } -void +void _X_COLD SRepXIListProperties(ClientPtr client, int size, xXIListPropertiesReply * rep) { swaps(&rep->sequenceNumber); @@ -1314,7 +1312,7 @@ SRepXIListProperties(ClientPtr client, int size, xXIListPropertiesReply * rep) WriteToClient(client, size, rep); } -void +void _X_COLD SRepXIGetProperty(ClientPtr client, int size, xXIGetPropertyReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/xiquerydevice.c b/xserver/Xi/xiquerydevice.c index 67a9a4f3f..fbb51fe81 100644 --- a/xserver/Xi/xiquerydevice.c +++ b/xserver/Xi/xiquerydevice.c @@ -50,7 +50,7 @@ static int ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo * info); static int SizeDeviceInfo(DeviceIntPtr dev); static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo * info); -int +int _X_COLD SProcXIQueryDevice(ClientPtr client) { REQUEST(xXIQueryDeviceReq); @@ -238,6 +238,18 @@ SizeDeviceClasses(DeviceIntPtr dev) } /** + * Get pointers to button information areas holding button mask and labels. + */ +static void +ButtonInfoData(xXIButtonInfo *info, int *mask_words, unsigned char **mask, + Atom **atoms) +{ + *mask_words = bytes_to_int32(bits_to_bytes(info->num_buttons)); + *mask = (unsigned char*) &info[1]; + *atoms = (Atom*) ((*mask) + (*mask_words) * 4); +} + +/** * Write button information into info. * @return Number of bytes written into info. */ @@ -245,21 +257,20 @@ int ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info, Bool reportState) { unsigned char *bits; + Atom *labels; int mask_len; int i; if (!dev || !dev->button) return 0; - mask_len = bytes_to_int32(bits_to_bytes(dev->button->numButtons)); - info->type = ButtonClass; info->num_buttons = dev->button->numButtons; + ButtonInfoData(info, &mask_len, &bits, &labels); info->length = bytes_to_int32(sizeof(xXIButtonInfo)) + info->num_buttons + mask_len; info->sourceid = dev->button->sourceid; - bits = (unsigned char *) &info[1]; memset(bits, 0, mask_len * 4); if (reportState) @@ -267,8 +278,7 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info, Bool reportState) if (BitIsOn(dev->button->down, i)) SetBit(bits, i); - bits += mask_len * 4; - memcpy(bits, dev->button->labels, dev->button->numButtons * sizeof(Atom)); + memcpy(labels, dev->button->labels, dev->button->numButtons * sizeof(Atom)); return info->length * 4; } @@ -277,13 +287,17 @@ static void SwapButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info) { Atom *btn; + int mask_len; + unsigned char *mask; + int i; + ButtonInfoData(info, &mask_len, &mask, &btn); swaps(&info->type); swaps(&info->length); swaps(&info->sourceid); - for (i = 0, btn = (Atom *) &info[1]; i < info->num_buttons; i++, btn++) + for (i = 0 ; i < info->num_buttons; i++, btn++) swapl(btn); swaps(&info->num_buttons); @@ -369,6 +383,9 @@ SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo * info) swapl(&info->min.frac); swapl(&info->max.integral); swapl(&info->max.frac); + swapl(&info->value.integral); + swapl(&info->value.frac); + swapl(&info->resolution); swaps(&info->number); swaps(&info->sourceid); } diff --git a/xserver/Xi/xiquerypointer.c b/xserver/Xi/xiquerypointer.c index c5b0ba7b6..5b77b1a44 100644 --- a/xserver/Xi/xiquerypointer.c +++ b/xserver/Xi/xiquerypointer.c @@ -59,7 +59,7 @@ * */ -int +int _X_COLD SProcXIQueryPointer(ClientPtr client) { REQUEST(xXIQueryPointerReq); diff --git a/xserver/Xi/xiqueryversion.c b/xserver/Xi/xiqueryversion.c index c705f788f..111f1d61a 100644 --- a/xserver/Xi/xiqueryversion.c +++ b/xserver/Xi/xiqueryversion.c @@ -130,7 +130,7 @@ ProcXIQueryVersion(ClientPtr client) /* Swapping routines */ -int +int _X_COLD SProcXIQueryVersion(ClientPtr client) { REQUEST(xXIQueryVersionReq); @@ -141,7 +141,7 @@ SProcXIQueryVersion(ClientPtr client) return (ProcXIQueryVersion(client)); } -void +void _X_COLD SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply * rep) { swaps(&rep->sequenceNumber); diff --git a/xserver/Xi/xiselectev.c b/xserver/Xi/xiselectev.c index 168579f5b..0498e0188 100644 --- a/xserver/Xi/xiselectev.c +++ b/xserver/Xi/xiselectev.c @@ -110,7 +110,7 @@ XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len) return Success; } -int +int _X_COLD SProcXISelectEvents(ClientPtr client) { int i; @@ -275,7 +275,7 @@ ProcXISelectEvents(ClientPtr client) return Success; } -int +int _X_COLD SProcXIGetSelectedEvents(ClientPtr client) { REQUEST(xXIGetSelectedEventsReq); diff --git a/xserver/Xi/xisetclientpointer.c b/xserver/Xi/xisetclientpointer.c index 24d4a5379..e02eac4bc 100644 --- a/xserver/Xi/xisetclientpointer.c +++ b/xserver/Xi/xisetclientpointer.c @@ -47,7 +47,7 @@ #include "xisetclientpointer.h" -int +int _X_COLD SProcXISetClientPointer(ClientPtr client) { REQUEST(xXISetClientPointerReq); diff --git a/xserver/Xi/xisetdevfocus.c b/xserver/Xi/xisetdevfocus.c index 96a9a16e4..2ed445cca 100644 --- a/xserver/Xi/xisetdevfocus.c +++ b/xserver/Xi/xisetdevfocus.c @@ -40,7 +40,7 @@ #include "exglobals.h" /* BadDevice */ #include "xisetdevfocus.h" -int +int _X_COLD SProcXISetFocus(ClientPtr client) { REQUEST(xXISetFocusReq); @@ -54,7 +54,7 @@ SProcXISetFocus(ClientPtr client) return ProcXISetFocus(client); } -int +int _X_COLD SProcXIGetFocus(ClientPtr client) { REQUEST(xXIGetFocusReq); diff --git a/xserver/Xi/xiwarppointer.c b/xserver/Xi/xiwarppointer.c index 8426443fa..955fdb965 100644 --- a/xserver/Xi/xiwarppointer.c +++ b/xserver/Xi/xiwarppointer.c @@ -52,7 +52,7 @@ * */ -int +int _X_COLD SProcXIWarpPointer(ClientPtr client) { REQUEST(xXIWarpPointerReq); |