summaryrefslogtreecommitdiff
path: root/src/XGrDvKey.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XGrDvKey.c')
-rw-r--r--src/XGrDvKey.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/src/XGrDvKey.c b/src/XGrDvKey.c
index 94e9ba4..6731e2c 100644
--- a/src/XGrDvKey.c
+++ b/src/XGrDvKey.c
@@ -61,25 +61,25 @@ SOFTWARE.
#include "XIint.h"
int
-XGrabDeviceKey (dpy, dev, key, modifiers, modifier_device,
- grab_window, owner_events, event_count, event_list, this_device_mode,
- other_devices_mode)
- register Display *dpy;
- XDevice *dev;
- unsigned int key; /* CARD8 */
- unsigned int modifiers; /* CARD16 */
- XDevice *modifier_device;
- Window grab_window;
- Bool owner_events;
- unsigned int event_count;
- XEventClass *event_list;
- int this_device_mode;
- int other_devices_mode;
- {
+XGrabDeviceKey(dpy, dev, key, modifiers, modifier_device,
+ grab_window, owner_events, event_count, event_list,
+ this_device_mode, other_devices_mode)
+ register Display *dpy;
+ XDevice *dev;
+ unsigned int key; /* CARD8 */
+ unsigned int modifiers; /* CARD16 */
+ XDevice *modifier_device;
+ Window grab_window;
+ Bool owner_events;
+ unsigned int event_count;
+ XEventClass *event_list;
+ int this_device_mode;
+ int other_devices_mode;
+{
register xGrabDeviceKeyReq *req;
- XExtDisplayInfo *info = XInput_find_display (dpy);
+ XExtDisplayInfo *info = XInput_find_display(dpy);
- LockDisplay (dpy);
+ LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release) == -1)
return (NoSuchExtension);
@@ -102,16 +102,15 @@ XGrabDeviceKey (dpy, dev, key, modifiers, modifier_device,
req->length += event_count;
/* note: Data is a macro that uses its arguments multiple
- times, so "nvalues" is changed in a separate assignment
- statement */
+ * times, so "nvalues" is changed in a separate assignment
+ * statement */
- if (event_count)
- {
+ if (event_count) {
event_count <<= 2;
- Data32 (dpy, (long *) event_list, event_count);
- }
+ Data32(dpy, (long *)event_list, event_count);
+ }
UnlockDisplay(dpy);
SyncHandle();
return (Success);
- }
+}