summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-12-16 14:43:29 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-03-13 12:31:21 +1000
commitf485a1af64bb00c696ea9f79961786bd791eaec1 (patch)
treef050b59176991529318b5d8ff7c029b6ac61f0dd /dix
parent9d9bd38fe1454590c303dc936ddac913808bf881 (diff)
Drop valuator mask argument from GetKeyboardEvents
Nothing was using it and if anyone had they would've gotten a warning and noticed that it doesn't actually work. Drop this, it has been unused for years. Input ABI 22 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c2
-rw-r--r--dix/getevents.c40
2 files changed, 6 insertions, 36 deletions
diff --git a/dix/devices.c b/dix/devices.c
index c4fdbe169..d8e7f9c40 100644
--- a/dix/devices.c
+++ b/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/dix/getevents.c b/dix/getevents.c
index bc7ffa63b..d0a87f7b1 100644
--- a/dix/getevents.c
+++ b/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;
}