aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xi/exevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/exevents.c')
-rw-r--r--nx-X11/programs/Xserver/Xi/exevents.c188
1 files changed, 47 insertions, 141 deletions
diff --git a/nx-X11/programs/Xserver/Xi/exevents.c b/nx-X11/programs/Xserver/Xi/exevents.c
index ce05858a8..07d6eac57 100644
--- a/nx-X11/programs/Xserver/Xi/exevents.c
+++ b/nx-X11/programs/Xserver/Xi/exevents.c
@@ -82,12 +82,10 @@ SOFTWARE.
#define Motion_Filter(class) (DevicePointerMotionMask | \
(class)->state | (class)->motionMask)
-static Bool ShouldFreeInputMasks(
- WindowPtr /* pWin */,
+static Bool ShouldFreeInputMasks(WindowPtr /* pWin */ ,
Bool /* ignoreSelectedEvents */
);
-static Bool MakeInputMasks (
- WindowPtr /* pWin */
+static Bool MakeInputMasks(WindowPtr /* pWin */
);
/**************************************************************************
@@ -97,8 +95,7 @@ static Bool MakeInputMasks (
*/
void
-RegisterOtherDevice (device)
- DeviceIntPtr device;
+RegisterOtherDevice(DeviceIntPtr device)
{
device->public.processInputProc = ProcessOtherEvent;
device->public.realInputProc = ProcessOtherEvent;
@@ -106,12 +103,8 @@ RegisterOtherDevice (device)
(device)->DeactivateGrab = DeactivateKeyboardGrab;
}
-/*ARGSUSED*/
-void
-ProcessOtherEvent (xE, other, count)
- xEventPtr xE;
- register DeviceIntPtr other;
- int count;
+ /*ARGSUSED*/ void
+ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
{
register BYTE *kptr;
register int i;
@@ -307,13 +300,8 @@ InitProximityClassDeviceStruct(DeviceIntPtr dev)
}
void
-InitValuatorAxisStruct( DeviceIntPtr dev,
- int axnum,
- int minval,
- int maxval,
- int resolution,
- int min_res,
- int max_res )
+InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval,
+ int resolution, int min_res, int max_res)
{
register AxisInfoPtr ax = dev->valuator->axes + axnum;
@@ -325,13 +313,8 @@ InitValuatorAxisStruct( DeviceIntPtr dev,
}
static void
-FixDeviceStateNotify (
- DeviceIntPtr dev,
- deviceStateNotify *ev,
- KeyClassPtr k,
- ButtonClassPtr b,
- ValuatorClassPtr v,
- int first)
+FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
+ ButtonClassPtr b, ValuatorClassPtr v, int first)
{
ev->type = DeviceStateNotify;
ev->deviceid = dev->id;
@@ -370,10 +353,7 @@ FixDeviceStateNotify (
}
static void
-FixDeviceValuator (
- DeviceIntPtr dev,
- deviceValuator *ev,
- ValuatorClassPtr v,
+FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v,
int first)
{
int nval = v->numAxes - first;
@@ -395,10 +375,8 @@ FixDeviceValuator (
}
void
-DeviceFocusEvent(dev, type, mode, detail, pWin)
- DeviceIntPtr dev;
- int type, mode, detail;
- register WindowPtr pWin;
+DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
+ register WindowPtr pWin)
{
deviceFocus event;
@@ -517,19 +495,10 @@ DeviceFocusEvent(dev, type, mode, detail, pWin)
}
int
-GrabButton(
- ClientPtr client,
- DeviceIntPtr dev,
- BYTE this_device_mode,
- BYTE other_devices_mode,
- CARD16 modifiers,
- DeviceIntPtr modifier_device,
- CARD8 button,
- Window grabWindow,
- BOOL ownerEvents,
- Cursor rcursor,
- Window rconfineTo,
- Mask eventMask)
+GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
+ BYTE other_devices_mode, CARD16 modifiers,
+ DeviceIntPtr modifier_device, CARD8 button, Window grabWindow,
+ BOOL ownerEvents, Cursor rcursor, Window rconfineTo, Mask eventMask)
{
WindowPtr pWin, confineTo;
CursorPtr cursor;
@@ -591,17 +560,10 @@ GrabButton(
}
int
-GrabKey(
- ClientPtr client,
- DeviceIntPtr dev,
- BYTE this_device_mode,
- BYTE other_devices_mode,
- CARD16 modifiers,
- DeviceIntPtr modifier_device,
- CARD8 key,
- Window grabWindow,
- BOOL ownerEvents,
- Mask mask)
+GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
+ BYTE other_devices_mode, CARD16 modifiers,
+ DeviceIntPtr modifier_device, CARD8 key, Window grabWindow,
+ BOOL ownerEvents, Mask mask)
{
WindowPtr pWin;
GrabPtr grab;
@@ -653,13 +615,8 @@ GrabKey(
}
int
-SelectForWindow(dev, pWin, client, mask, exclusivemasks, validmasks)
- DeviceIntPtr dev;
- WindowPtr pWin;
- ClientPtr client;
- Mask mask;
- Mask exclusivemasks;
- Mask validmasks;
+SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client,
+ Mask mask, Mask exclusivemasks, Mask validmasks)
{
int mskidx = dev->id;
int i, ret;
@@ -720,19 +677,14 @@ SelectForWindow(dev, pWin, client, mask, exclusivemasks, validmasks)
if (dev->valuator)
if ((dev->valuator->motionHintWindow == pWin) &&
(mask & DevicePointerMotionHintMask) &&
- !(check & DevicePointerMotionHintMask) &&
- !dev->grab)
+ !(check & DevicePointerMotionHintMask) && !dev->grab)
dev->valuator->motionHintWindow = NullWindow;
RecalculateDeviceDeliverableEvents(pWin);
return Success;
}
int
-AddExtensionClient (pWin, client, mask, mskidx)
- WindowPtr pWin;
- ClientPtr client;
- Mask mask;
- int mskidx;
+AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx)
{
InputClientsPtr others;
@@ -754,8 +706,7 @@ AddExtensionClient (pWin, client, mask, mskidx)
}
static Bool
-MakeInputMasks (pWin)
- WindowPtr pWin;
+MakeInputMasks(WindowPtr pWin)
{
struct _OtherInputMasks *imasks;
@@ -769,8 +720,7 @@ MakeInputMasks (pWin)
}
void
-RecalculateDeviceDeliverableEvents(pWin)
- WindowPtr pWin;
+RecalculateDeviceDeliverableEvents(WindowPtr pWin)
{
register InputClientsPtr others;
struct _OtherInputMasks *inputMasks; /* default: NULL */
@@ -811,9 +761,7 @@ RecalculateDeviceDeliverableEvents(pWin)
}
int
-InputClientGone(pWin, id)
- register WindowPtr pWin;
- XID id;
+InputClientGone(register WindowPtr pWin, XID id)
{
register InputClientsPtr other, prev;
if (!wOtherInputMasks(pWin))
@@ -862,14 +810,8 @@ InputClientGone(pWin, id)
}
int
-SendEvent (client, d, dest, propagate, ev, mask, count)
- ClientPtr client;
- DeviceIntPtr d;
- Window dest;
- Bool propagate;
- xEvent *ev;
- Mask mask;
- int count;
+SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate,
+ xEvent * ev, Mask mask, int count)
{
WindowPtr pWin;
WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
@@ -935,11 +877,7 @@ SendEvent (client, d, dest, propagate, ev, mask, count)
}
int
-SetButtonMapping (client, dev, nElts, map)
- ClientPtr client;
- DeviceIntPtr dev;
- int nElts;
- BYTE *map;
+SetButtonMapping(ClientPtr client, DeviceIntPtr dev, int nElts, BYTE * map)
{
register int i;
ButtonClassPtr b = dev->button;
@@ -964,14 +902,8 @@ SetButtonMapping (client, dev, nElts, map)
}
int
-SetModifierMapping(client, dev, len, rlen, numKeyPerModifier, inputMap, k)
- ClientPtr client;
- DeviceIntPtr dev;
- int len;
- int rlen;
- int numKeyPerModifier;
- KeyCode *inputMap;
- KeyClassPtr *k;
+SetModifierMapping(ClientPtr client, DeviceIntPtr dev, int len, int rlen,
+ int numKeyPerModifier, KeyCode * inputMap, KeyClassPtr * k)
{
KeyCode *map = NULL;
int inputMapLen;
@@ -1048,11 +980,8 @@ SetModifierMapping(client, dev, len, rlen, numKeyPerModifier, inputMap, k)
}
void
-SendDeviceMappingNotify(
- CARD8 request,
- KeyCode firstKeyCode,
- CARD8 count,
- DeviceIntPtr dev)
+SendDeviceMappingNotify(CARD8 request,
+ KeyCode firstKeyCode, CARD8 count, DeviceIntPtr dev)
{
xEvent event;
deviceMappingNotify *ev = (deviceMappingNotify *) & event;
@@ -1071,15 +1000,12 @@ SendDeviceMappingNotify(
}
int
-ChangeKeyMapping(
- ClientPtr client,
+ChangeKeyMapping(ClientPtr client,
DeviceIntPtr dev,
unsigned len,
int type,
KeyCode firstKeyCode,
- CARD8 keyCodes,
- CARD8 keySymsPerKeyCode,
- KeySym *map)
+ CARD8 keyCodes, CARD8 keySymsPerKeyCode, KeySym * map)
{
KeySymsRec keysyms;
KeyClassPtr k = dev->key;
@@ -1113,9 +1039,7 @@ ChangeKeyMapping(
}
void
-DeleteWindowFromAnyExtEvents(pWin, freeResources)
- WindowPtr pWin;
- Bool freeResources;
+DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources)
{
int i;
DeviceIntPtr dev;
@@ -1144,9 +1068,7 @@ DeleteWindowFromAnyExtEvents(pWin, freeResources)
}
void
-DeleteDeviceFromAnyExtEvents(pWin, dev)
- WindowPtr pWin;
- DeviceIntPtr dev;
+DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev)
{
WindowPtr parent;
@@ -1213,9 +1135,7 @@ DeleteDeviceFromAnyExtEvents(pWin, dev)
}
int
-MaybeSendDeviceMotionNotifyHint (pEvents, mask)
- deviceKeyButtonPointer *pEvents;
- Mask mask;
+MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask)
{
DeviceIntPtr dev;
@@ -1239,13 +1159,9 @@ MaybeSendDeviceMotionNotifyHint (pEvents, mask)
}
void
-CheckDeviceGrabAndHintWindow (pWin, type, xE, grab, client, deliveryMask)
- WindowPtr pWin;
- int type;
- deviceKeyButtonPointer *xE;
- GrabPtr grab;
- ClientPtr client;
- Mask deliveryMask;
+CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type,
+ deviceKeyButtonPointer * xE, GrabPtr grab,
+ ClientPtr client, Mask deliveryMask)
{
DeviceIntPtr dev;
@@ -1271,10 +1187,7 @@ CheckDeviceGrabAndHintWindow (pWin, type, xE, grab, client, deliveryMask)
}
Mask
-DeviceEventMaskForClient(dev, pWin, client)
- DeviceIntPtr dev;
- WindowPtr pWin;
- ClientPtr client;
+DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
{
register InputClientsPtr other;
@@ -1290,9 +1203,7 @@ DeviceEventMaskForClient(dev, pWin, client)
}
void
-MaybeStopDeviceHint(dev, client)
- register DeviceIntPtr dev;
- ClientPtr client;
+MaybeStopDeviceHint(register DeviceIntPtr dev, ClientPtr client)
{
WindowPtr pWin;
GrabPtr grab = dev->grab;
@@ -1310,11 +1221,8 @@ MaybeStopDeviceHint(dev, client)
}
int
-DeviceEventSuppressForWindow(pWin, client, mask, maskndx)
- WindowPtr pWin;
- ClientPtr client;
- Mask mask;
- int maskndx;
+DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask,
+ int maskndx)
{
struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
@@ -1343,9 +1251,7 @@ DeviceEventSuppressForWindow(pWin, client, mask, maskndx)
}
static Bool
-ShouldFreeInputMasks (pWin, ignoreSelectedEvents)
- WindowPtr pWin;
- Bool ignoreSelectedEvents;
+ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents)
{
int i;
Mask allInputEventMasks = 0;