diff options
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/Xext/xtest.c | 2 | ||||
-rw-r--r-- | xorg-server/autogen.sh | 8 | ||||
-rw-r--r-- | xorg-server/dix/devices.c | 2 | ||||
-rw-r--r-- | xorg-server/dix/getevents.c | 40 | ||||
-rw-r--r-- | xorg-server/hw/dmx/input/dmxevents.c | 7 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kinput.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Events.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Module.h | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Xinput.c | 41 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Xinput.h | 13 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/int10/generic.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/int10/linux.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/sdksyms.sh | 14 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Events.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xquartz/darwinEvents.c | 6 | ||||
-rw-r--r-- | xorg-server/hw/xwayland/xwayland-input.c | 12 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winkeybd.c | 2 | ||||
-rw-r--r-- | xorg-server/include/input.h | 7 | ||||
-rw-r--r-- | xorg-server/os/access.c | 2 | ||||
-rw-r--r-- | xorg-server/os/connection.c | 9 |
20 files changed, 59 insertions, 118 deletions
diff --git a/xorg-server/Xext/xtest.c b/xorg-server/Xext/xtest.c index 88df4433b..2371a69e1 100644 --- a/xorg-server/Xext/xtest.c +++ b/xorg-server/Xext/xtest.c @@ -421,7 +421,7 @@ ProcXTestFakeInput(ClientPtr client) case KeyPress: case KeyRelease: nevents = - GetKeyboardEvents(xtest_evlist, dev, type, ev->u.u.detail, NULL); + GetKeyboardEvents(xtest_evlist, dev, type, ev->u.u.detail); break; } diff --git a/xorg-server/autogen.sh b/xorg-server/autogen.sh index dd0731ad9..aee4beba2 100644 --- a/xorg-server/autogen.sh +++ b/xorg-server/autogen.sh @@ -1,14 +1,14 @@ #! /bin/sh -srcdir=`dirname $0` +srcdir=`dirname "$0"` test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` -cd $srcdir +cd "$srcdir" autoreconf --force -v --install || exit 1 -cd $ORIGDIR || exit $? +cd "$ORIGDIR" || exit $? if test -z "$NOCONFIGURE"; then - exec $srcdir/configure "$@" + exec "$srcdir"/configure "$@" fi diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index c4fdbe169..d8e7f9c40 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -2518,7 +2518,7 @@ ReleaseButtonsAndKeys(DeviceIntPtr dev) /* Release all keys */ for (i = 0; k && i < MAP_LENGTH; i++) { if (BitIsOn(k->down, i)) { - nevents = GetKeyboardEvents(eventlist, dev, KeyRelease, i, NULL); + nevents = GetKeyboardEvents(eventlist, dev, KeyRelease, i); for (j = 0; j < nevents; j++) mieqProcessDeviceEvent(dev, &eventlist[j], NULL); } diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c index bc7ffa63b..d0a87f7b1 100644 --- a/xorg-server/dix/getevents.c +++ b/xorg-server/dix/getevents.c @@ -1049,21 +1049,18 @@ event_set_root_coordinates(DeviceEvent *event, double x, double y) * * This function is not reentrant. Disable signals before calling. * - * FIXME: flags for relative/abs motion? - * * @param device The device to generate the event for * @param type Event type, one of KeyPress or KeyRelease * @param keycode Key code of the pressed/released key - * @param mask Valuator mask for valuators present for this event. * */ void QueueKeyboardEvents(DeviceIntPtr device, int type, - int keycode, const ValuatorMask *mask) + int keycode) { int nevents; - nevents = GetKeyboardEvents(InputEventList, device, type, keycode, mask); + nevents = GetKeyboardEvents(InputEventList, device, type, keycode); queueEventList(device, InputEventList, nevents); } @@ -1078,20 +1075,17 @@ QueueKeyboardEvents(DeviceIntPtr device, int type, */ int GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type, - int key_code, const ValuatorMask *mask_in) + int key_code) { int num_events = 0; CARD32 ms = 0; DeviceEvent *event; RawDeviceEvent *raw; - ValuatorMask mask; #if XSERVER_DTRACE if (XSERVER_INPUT_EVENT_ENABLED()) { - XSERVER_INPUT_EVENT(pDev->id, type, key_code, 0, - mask_in ? mask_in->last_bit + 1 : 0, - mask_in ? mask_in->mask : NULL, - mask_in ? mask_in->valuators : NULL); + XSERVER_INPUT_EVENT(pDev->id, type, key_code, 0, 0, + NULL, NULL); } #endif @@ -1104,11 +1098,6 @@ GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type, (key_code < 8 || key_code > 255)) return 0; - if (mask_in && valuator_mask_size(mask_in) > 1) { - ErrorF("[dix] the server does not handle valuator masks with " - "keyboard events. This is a bug. You may fix it.\n"); - } - num_events = 1; events = @@ -1130,14 +1119,7 @@ GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type, events++; num_events++; - valuator_mask_copy(&mask, mask_in); - init_raw(pDev, raw, ms, type, key_code); - set_raw_valuators(raw, &mask, raw->valuators.data_raw); - - clipValuators(pDev, &mask); - - set_raw_valuators(raw, &mask, raw->valuators.data); event = &events->device_event; init_device_event(event, pDev, ms); @@ -1152,18 +1134,6 @@ GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type, set_key_up(pDev, key_code, KEY_POSTED); } - clipValuators(pDev, &mask); - - set_valuators(pDev, event, &mask); - - if (!IsFloating(pDev)) { - DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER); - - event_set_root_coordinates(event, - master->last.valuators[0], - master->last.valuators[1]); - } - return num_events; } diff --git a/xorg-server/hw/dmx/input/dmxevents.c b/xorg-server/hw/dmx/input/dmxevents.c index 14ac05f5c..2b579ee87 100644 --- a/xorg-server/hw/dmx/input/dmxevents.c +++ b/xorg-server/hw/dmx/input/dmxevents.c @@ -488,12 +488,9 @@ dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal, switch (type) { case XI_DeviceKeyPress: case XI_DeviceKeyRelease: - EXTRACT_VALUATORS(ke, valuators); - valuator_mask_set_range(&mask, ke->first_axis, ke->axes_count, - valuators); if (block) OsBlockSIGIO(); - QueueKeyboardEvents(pDevice, event, ke->keycode, &mask); + QueueKeyboardEvents(pDevice, event, ke->keycode); if (block) OsReleaseSIGIO(); break; @@ -718,7 +715,7 @@ dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, detail = dmxFixup(pDev, detail, keySym); /*ErrorF("KEY %d sym %d\n", detail, (int) keySym); */ - QueueKeyboardEvents(p, type, detail, NULL); + QueueKeyboardEvents(p, type, detail); return; case ButtonPress: diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c index a539ca513..057f53bcd 100644 --- a/xorg-server/hw/kdrive/src/kinput.c +++ b/xorg-server/hw/kdrive/src/kinput.c @@ -1831,7 +1831,7 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo * ki, else type = KeyPress; - QueueKeyboardEvents(ki->dixdev, type, key_code, NULL); + QueueKeyboardEvents(ki->dixdev, type, key_code); } else { ErrorF("driver %s wanted to post scancode %d outside of [%d, %d]!\n", diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c index 16b3e2821..c06aaaee1 100644 --- a/xorg-server/hw/xfree86/common/xf86Events.c +++ b/xorg-server/hw/xfree86/common/xf86Events.c @@ -403,7 +403,7 @@ xf86ReleaseKeys(DeviceIntPtr pDev) i < keyc->xkbInfo->desc->max_key_code; i++) { if (key_is_down(pDev, i, KEY_POSTED)) { OsBlockSIGIO(); - QueueKeyboardEvents(pDev, KeyRelease, i, NULL); + QueueKeyboardEvents(pDev, KeyRelease, i); OsReleaseSIGIO(); } } diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h index e68fe9cba..25a8869b0 100644 --- a/xorg-server/hw/xfree86/common/xf86Module.h +++ b/xorg-server/hw/xfree86/common/xf86Module.h @@ -81,7 +81,7 @@ typedef enum { */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) #define ABI_VIDEODRV_VERSION SET_ABI_VERSION(19, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(21, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(22, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(9, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index 1fb5b1635..9fa3dc43c 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -1326,47 +1326,21 @@ xf86PostButtonEventM(DeviceIntPtr device, } void -xf86PostKeyEvent(DeviceIntPtr device, - unsigned int key_code, - int is_down, - int is_absolute, int first_valuator, int num_valuators, ...) +xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down) { - va_list var; - int i = 0; - ValuatorMask mask; - - XI_VERIFY_VALUATORS(num_valuators); - - valuator_mask_zero(&mask); - - va_start(var, num_valuators); - for (i = 0; i < num_valuators; i++) - valuator_mask_set(&mask, first_valuator + i, va_arg(var, int)); - - va_end(var); - - xf86PostKeyEventM(device, key_code, is_down, is_absolute, &mask); + xf86PostKeyEventM(device, key_code, is_down); } void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_code, - int is_down, - int is_absolute, - int first_valuator, int num_valuators, const int *valuators) + int is_down) { - ValuatorMask mask; - - XI_VERIFY_VALUATORS(num_valuators); - - valuator_mask_set_range(&mask, first_valuator, num_valuators, valuators); - xf86PostKeyEventM(device, key_code, is_down, is_absolute, &mask); + xf86PostKeyEventM(device, key_code, is_down); } void -xf86PostKeyEventM(DeviceIntPtr device, - unsigned int key_code, - int is_down, int is_absolute, const ValuatorMask *mask) +xf86PostKeyEventM(DeviceIntPtr device, unsigned int key_code, int is_down) { #if XFreeXDGA DeviceIntPtr pointer; @@ -1382,8 +1356,7 @@ xf86PostKeyEventM(DeviceIntPtr device, } #endif - QueueKeyboardEvents(device, - is_down ? KeyPress : KeyRelease, key_code, mask); + QueueKeyboardEvents(device, is_down ? KeyPress : KeyRelease, key_code); } void @@ -1392,7 +1365,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down) ValuatorMask mask; valuator_mask_zero(&mask); - xf86PostKeyEventM(device, key_code, is_down, 0, &mask); + xf86PostKeyEventM(device, key_code, is_down); } InputInfoPtr diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h index 42d66d22e..0024053c7 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.h +++ b/xorg-server/hw/xfree86/common/xf86Xinput.h @@ -148,18 +148,11 @@ extern _X_EXPORT void xf86PostButtonEventM(DeviceIntPtr device, int is_absolute, int button, int is_down, const ValuatorMask *mask); extern _X_EXPORT void xf86PostKeyEvent(DeviceIntPtr device, - unsigned int key_code, int is_down, - int is_absolute, int first_valuator, - int num_valuators, ...); + unsigned int key_code, int is_down); extern _X_EXPORT void xf86PostKeyEventM(DeviceIntPtr device, - unsigned int key_code, int is_down, - int is_absolute, - const ValuatorMask *mask); + unsigned int key_code, int is_down); extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device, - unsigned int key_code, int is_down, - int is_absolute, int first_valuator, - int num_valuators, - const int *valuators); + unsigned int key_code, int is_down); extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down); extern _X_EXPORT void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, diff --git a/xorg-server/hw/xfree86/int10/generic.c b/xorg-server/hw/xfree86/int10/generic.c index 012d1941a..8d5c4daf3 100644 --- a/xorg-server/hw/xfree86/int10/generic.c +++ b/xorg-server/hw/xfree86/int10/generic.c @@ -104,7 +104,7 @@ readIntVec(struct pci_device *dev, unsigned char *buf, int len) { void *map; - if (!pci_device_map_legacy(dev, 0, len, 0, &map)) + if (pci_device_map_legacy(dev, 0, len, 0, &map)) return FALSE; memcpy(buf, map, len); diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c index 79b9a8858..6ca118f25 100644 --- a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c +++ b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c @@ -75,7 +75,7 @@ readLegacy(struct pci_device *dev, unsigned char *buf, int base, int len) { void *map; - if (!pci_device_map_legacy(dev, base, len, 0, &map)) + if (pci_device_map_legacy(dev, base, len, 0, &map)) return FALSE; memcpy(buf, map, len); diff --git a/xorg-server/hw/xfree86/sdksyms.sh b/xorg-server/hw/xfree86/sdksyms.sh index 2305073a0..05ac41096 100644 --- a/xorg-server/hw/xfree86/sdksyms.sh +++ b/xorg-server/hw/xfree86/sdksyms.sh @@ -350,13 +350,25 @@ BEGIN { if (sdk) { n = 3; + # skip line numbers GCC 5 adds before __attribute__ + while ($n == "" || $0 ~ /^# [0-9]+ "/) { + getline; + n = 1; + } + # skip attribute, if any while ($n ~ /^(__attribute__|__global)/ || # skip modifiers, if any $n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ || # skip pointer - $n ~ /^[a-zA-Z0-9_]*\*$/) + $n ~ /^[a-zA-Z0-9_]*\*$/) { n++; + # skip line numbers GCC 5 adds after __attribute__ + while ($n == "" || $0 ~ /^# [0-9]+ "/) { + getline; + n = 1; + } + } # type specifier may not be set, as in # extern _X_EXPORT unsigned name(...) diff --git a/xorg-server/hw/xnest/Events.c b/xorg-server/hw/xnest/Events.c index 3ff095bb8..f727557ba 100644 --- a/xorg-server/hw/xnest/Events.c +++ b/xorg-server/hw/xnest/Events.c @@ -103,7 +103,7 @@ void xnestQueueKeyEvent(int type, unsigned int keycode) { lastEventTime = GetTimeInMillis(); - QueueKeyboardEvents(xnestKeyboardDevice, type, keycode, NULL); + QueueKeyboardEvents(xnestKeyboardDevice, type, keycode); } void diff --git a/xorg-server/hw/xquartz/darwinEvents.c b/xorg-server/hw/xquartz/darwinEvents.c index 5a5e4dad2..9bf2f14ee 100644 --- a/xorg-server/hw/xquartz/darwinEvents.c +++ b/xorg-server/hw/xquartz/darwinEvents.c @@ -456,8 +456,7 @@ DarwinInputReleaseButtonsAndKeys(DeviceIntPtr pDev) if (pDev->key) { for (i = 0; i < NUM_KEYCODES; i++) { if (BitIsOn(pDev->key->down, i + MIN_KEYCODE)) { - QueueKeyboardEvents(pDev, KeyRelease, i + MIN_KEYCODE, - NULL); + QueueKeyboardEvents(pDev, KeyRelease, i + MIN_KEYCODE); } } } @@ -611,8 +610,7 @@ DarwinSendKeyboardEvents(int ev_type, int keycode) darwinEvents_lock(); { - QueueKeyboardEvents(darwinKeyboard, ev_type, keycode + MIN_KEYCODE, - NULL); + QueueKeyboardEvents(darwinKeyboard, ev_type, keycode + MIN_KEYCODE); DarwinPokeEQ(); } darwinEvents_unlock(); } diff --git a/xorg-server/hw/xwayland/xwayland-input.c b/xorg-server/hw/xwayland/xwayland-input.c index 5e204189f..cc3bc53c8 100644 --- a/xorg-server/hw/xwayland/xwayland-input.c +++ b/xorg-server/hw/xwayland/xwayland-input.c @@ -323,7 +323,6 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard, uint32_t serial, { struct xwl_seat *xwl_seat = data; uint32_t *k, *end; - ValuatorMask mask; xwl_seat->xwl_screen->serial = serial; @@ -338,9 +337,8 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard, uint32_t serial, *k = key; } - valuator_mask_zero(&mask); QueueKeyboardEvents(xwl_seat->keyboard, - state ? KeyPress : KeyRelease, key + 8, &mask); + state ? KeyPress : KeyRelease, key + 8); } static void @@ -393,16 +391,14 @@ keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, struct wl_surface *surface, struct wl_array *keys) { struct xwl_seat *xwl_seat = data; - ValuatorMask mask; uint32_t *k; xwl_seat->xwl_screen->serial = serial; xwl_seat->keyboard_focus = surface; wl_array_copy(&xwl_seat->keys, keys); - valuator_mask_zero(&mask); wl_array_for_each(k, &xwl_seat->keys) - QueueKeyboardEvents(xwl_seat->keyboard, KeyPress, *k + 8, &mask); + QueueKeyboardEvents(xwl_seat->keyboard, KeyPress, *k + 8); } static void @@ -410,14 +406,12 @@ keyboard_handle_leave(void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface) { struct xwl_seat *xwl_seat = data; - ValuatorMask mask; uint32_t *k; xwl_seat->xwl_screen->serial = serial; - valuator_mask_zero(&mask); wl_array_for_each(k, &xwl_seat->keys) - QueueKeyboardEvents(xwl_seat->keyboard, KeyRelease, *k + 8, &mask); + QueueKeyboardEvents(xwl_seat->keyboard, KeyRelease, *k + 8); xwl_seat->keyboard_focus = NULL; } diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c index 3a75ab268..e7202a6cb 100644 --- a/xorg-server/hw/xwin/winkeybd.c +++ b/xorg-server/hw/xwin/winkeybd.c @@ -502,7 +502,7 @@ winSendKeyEvent(DWORD dwKey, Bool fDown) g_winKeyState[dwKey] = fDown; QueueKeyboardEvents(g_pwinKeyboard, fDown ? KeyPress : KeyRelease, - dwKey + MIN_KEYCODE, NULL); + dwKey + MIN_KEYCODE); winDebug("winSendKeyEvent: dwKey: %d, fDown: %d\n", dwKey, fDown); } diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h index bf22dc7ee..00a9cbd6d 100644 --- a/xorg-server/include/input.h +++ b/xorg-server/include/input.h @@ -448,12 +448,11 @@ extern _X_EXPORT void QueuePointerEvents(DeviceIntPtr pDev, extern _X_EXPORT int GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type, - int key_code, const ValuatorMask *mask); + int key_code); extern _X_EXPORT void QueueKeyboardEvents(DeviceIntPtr pDev, int type, - int key_code, - const ValuatorMask *mask); + int key_code); extern int GetTouchEvents(InternalEvent *events, DeviceIntPtr pDev, @@ -505,7 +504,7 @@ extern int AttachDevice(ClientPtr client, DeviceIntPtr slave, DeviceIntPtr master); extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd); -extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type); +extern _X_EXPORT DeviceIntPtr GetMaster(DeviceIntPtr dev, int type); extern _X_EXPORT int AllocDevicePair(ClientPtr client, const char *name, diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c index 28f2d3213..8fa028eb4 100644 --- a/xorg-server/os/access.c +++ b/xorg-server/os/access.c @@ -1392,7 +1392,7 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client) } for (host = validhosts; host; host = host->next) { if (host->family == FamilyServerInterpreted) { - if (addr && siAddrMatch(family, addr, len, host, client)) { + if (siAddrMatch(family, addr, len, host, client)) { return 0; } } diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c index ddfe50a3e..7ff44e175 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -513,8 +513,13 @@ CloseWellKnownConnections(void) { int i; - for (i = 0; i < ListenTransCount; i++) - _XSERVTransClose(ListenTransConns[i]); + for (i = 0; i < ListenTransCount; i++) { + if (ListenTransConns[i] != NULL) { + _XSERVTransClose(ListenTransConns[i]); + ListenTransConns[i] = NULL; + } + } + ListenTransCount = 0; } static void |