diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-06-30 11:52:26 +1000 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2011-04-12 15:37:56 -0700 |
commit | dbcf105a03d29ad6541dd851a257393af54f5dd1 (patch) | |
tree | a37e75db6468fcef2c392a416db0b96c0a0b67b6 /xts5/XI | |
parent | d12f9c04388ce98953e8cfa75c40e7e3628ff573 (diff) |
Remove superfluous (void) casts.
sed -e "s/\([ ]\)(void) \(.*\)/\1\2/"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to 'xts5/XI')
-rw-r--r-- | xts5/XI/AllowDeviceEvents.m | 16 | ||||
-rw-r--r-- | xts5/XI/CloseDevice.m | 4 | ||||
-rw-r--r-- | xts5/XI/GrabDevice.m | 8 | ||||
-rw-r--r-- | xts5/XI/GrabDeviceButton.m | 2 | ||||
-rw-r--r-- | xts5/XI/GrabDeviceKey.m | 2 | ||||
-rw-r--r-- | xts5/XI/SendExtensionEvent.m | 50 | ||||
-rw-r--r-- | xts5/XI/SetDeviceButtonMapping.m | 6 | ||||
-rw-r--r-- | xts5/XI/XGetDeviceModifierMapping.m | 2 | ||||
-rw-r--r-- | xts5/XI/XSetDeviceFocus.m | 14 | ||||
-rw-r--r-- | xts5/XI/XUngrabDevice.m | 10 |
10 files changed, 57 insertions, 57 deletions
diff --git a/xts5/XI/AllowDeviceEvents.m b/xts5/XI/AllowDeviceEvents.m index 47114013..aa489ff3 100644 --- a/xts5/XI/AllowDeviceEvents.m +++ b/xts5/XI/AllowDeviceEvents.m @@ -136,7 +136,7 @@ grabstartup() DeviceButtonPress(device, dbp, class[1]); DeviceButtonRelease(device, dbr, class[2]); XSelectExtensionEvent(Dsp, grabwin, class, 3); - (void) warppointer(Dsp, grabwin, 1, 1); + warppointer(Dsp, grabwin, 1, 1); XSync(Dsp,0); return (1); } @@ -541,7 +541,7 @@ struct area area; /* * Set up a device freeze as a result of a button press. */ - (void) warppointer(display, grabwin, 1, 1); + warppointer(display, grabwin, 1, 1); setarea(&area, 50, 50, 5, 5); chwin = crechild(display, grabwin, &area); @@ -557,7 +557,7 @@ struct area area; * Activate the grab. */ XSync(display, True); /* Discard any events */ - (void) warppointer(display, chwin, 1, 1); + warppointer(display, chwin, 1, 1); devicebuttonpress(display, Devs.Button, Button1); XSync(display,False); @@ -643,7 +643,7 @@ Verify device is not frozen. return; device = Devs.Button; event_mode = ReplayThisDevice; - (void) warppointer(display, grabwin, 1, 1); + warppointer(display, grabwin, 1, 1); XCALL; if (!ispfrozen(display)) @@ -678,7 +678,7 @@ int key; if (noext(1)) return; - (void) warppointer(display, grabwin, 1, 1); + warppointer(display, grabwin, 1, 1); XSync(display,0); key = getkeycode(display); @@ -777,7 +777,7 @@ int key; */ win = defwin(display); XSelectInput(display, win, KeyPressMask); - (void) warppointer(display, win, 1, 1); + warppointer(display, win, 1, 1); keypress(display, key); if (XCheckMaskEvent(display, (long)KeyPressMask, &ev)) res = False; @@ -797,7 +797,7 @@ bothset() XUngrabDevice(display, device, CurrentTime); XUngrabKeyboard(display, CurrentTime); - (void) warppointer(display, grabwin, 5, 5); + warppointer(display, grabwin, 5, 5); XGrabDevice(display, device, grabwin, False, 3, class, GrabModeSync, GrabModeAsync, CurrentTime); @@ -976,7 +976,7 @@ int key; False, PointerMotionMask, GrabModeSync, GrabModeSync, None, None); - (void) warppointer(display, grabwin, 1, 1); + warppointer(display, grabwin, 1, 1); devicebuttonpress(display, Devs.Button, Button1); if (ispfrozen(display)) diff --git a/xts5/XI/CloseDevice.m b/xts5/XI/CloseDevice.m index c7ea657c..1ab0273c 100644 --- a/xts5/XI/CloseDevice.m +++ b/xts5/XI/CloseDevice.m @@ -276,7 +276,7 @@ int Min_KeyCode, Max_KeyCode, numkeys; w = defwin(display); w2 = defwin(client1); - (void) warppointer(client1, w2, 1, 1); + warppointer(client1, w2, 1, 1); DeviceKeyPress(dev2, dkp, dkpclass); DeviceKeyRelease(dev2, dkr, dkrclass); XSelectExtensionEvent(client1, w2, &dkpclass, 1); @@ -359,7 +359,7 @@ int Min_KeyCode, Max_KeyCode, numkeys; dev2 = XOpenDevice(client1,Devs.Key->device_id); w = defwin(client1); - (void) warppointer(client1, w, 1, 1); + warppointer(client1, w, 1, 1); DeviceKeyPress(dev2, dkp, dkpclass); DeviceKeyRelease(dev2, dkr, dkrclass); XSelectExtensionEvent(client1, w, &dkpclass, 1); diff --git a/xts5/XI/GrabDevice.m b/xts5/XI/GrabDevice.m index bac7d0c7..7eae5d76 100644 --- a/xts5/XI/GrabDevice.m +++ b/xts5/XI/GrabDevice.m @@ -309,7 +309,7 @@ XEvent ev; device = Devs.NoKeys; grab_window = defwin(display); - (void) warppointer(display, grab_window, 1, 1); + warppointer(display, grab_window, 1, 1); DeviceKeyRelease(Devs.Key, dkr, dkrclass); XSelectExtensionEvent(display, grab_window, &dkrclass, 1); other_devices_mode = GrabModeAsync; @@ -367,7 +367,7 @@ XEvent ev; device = Devs.NoKeys; grab_window = defwin(display); - (void) warppointer(display, grab_window, 1, 1); + warppointer(display, grab_window, 1, 1); DeviceKeyRelease(Devs.Key, dkr, dkrclass); XSelectExtensionEvent(display, grab_window, &dkrclass, 1); other_devices_mode = GrabModeSync; @@ -465,7 +465,7 @@ XEventClass dmnc; return; } DeviceMotionNotify(Devs.Valuator, dmn, dmnc); - (void) warppointer(display, DRW(display), 0, 0); + warppointer(display, DRW(display), 0, 0); client2 = opendisplay(); @@ -488,7 +488,7 @@ XEventClass dmnc; * If the grab has been released then this will generate * an event for client2. */ - (void) warppointer(display, win, 0, 0); + warppointer(display, win, 0, 0); XSync(client2, False); if (XCheckWindowEvent(client2, win, PointerMotionMask|EnterWindowMask, &ev)) diff --git a/xts5/XI/GrabDeviceButton.m b/xts5/XI/GrabDeviceButton.m index 6fcc0534..e95a77b9 100644 --- a/xts5/XI/GrabDeviceButton.m +++ b/xts5/XI/GrabDeviceButton.m @@ -367,7 +367,7 @@ int n; XSelectExtensionEvent(display, grab_window, &dbrclass, 1); - (void) warppointer(display, grab_window, 1, 1); + warppointer(display, grab_window, 1, 1); XSync(display, True); /* Discard any events */ devicebuttonpress(display, Devs.Button, Button1); diff --git a/xts5/XI/GrabDeviceKey.m b/xts5/XI/GrabDeviceKey.m index c451e4f4..2dd5bcf1 100644 --- a/xts5/XI/GrabDeviceKey.m +++ b/xts5/XI/GrabDeviceKey.m @@ -271,7 +271,7 @@ int ret, n; DeviceKeyRelease(device, dkr, dkrclass); XSelectExtensionEvent(display, grab_window, &dkpclass, 1); - (void) warppointer(display, grab_window, 1, 1); + warppointer(display, grab_window, 1, 1); XSync(display, True); /* Discard any events */ devicekeypress(display, device, MinKeyCode); XSync(display, False); diff --git a/xts5/XI/SendExtensionEvent.m b/xts5/XI/SendExtensionEvent.m index 5311bebd..01f448dc 100644 --- a/xts5/XI/SendExtensionEvent.m +++ b/xts5/XI/SendExtensionEvent.m @@ -248,15 +248,15 @@ XEventClass dbpc; /* Grab server. */ XGrabServer(display); /* Enable synchronization. */ - (void) XSynchronize(display, True); + XSynchronize(display, True); /* Save initial pointer location. */ - (void) XQueryPointer(display, ptrwin, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); + XQueryPointer(display, ptrwin, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); /* Warp pointer to window. */ XWarpPointer(display, None, ptrwin, 0, 0, 0, 0, 0, 0); /* Get new pointer location. */ if (XQueryPointer(display, ptrwin, &wtmp, &wtmp, &oroot_x, &oroot_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer on wrong root."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } else @@ -272,7 +272,7 @@ XEventClass dbpc; /* Get current pointer location. */ if (XQueryPointer(display, ptrwin, &wtmp, &wtmp, &root_x, &root_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer moved."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } @@ -291,7 +291,7 @@ XEventClass dbpc; /* Warp pointer back to where it started. */ XWarpPointer(display, None, oldroot, 0, 0, 0, 0, sroot_x, sroot_y); /* Disable synchronization. */ - (void) XSynchronize(display, False); + XSynchronize(display, False); /* Ungrab server. */ XUngrabServer(display); /* Verify that XSendExtensionEvent returned non-zero. */ @@ -406,18 +406,18 @@ XEventClass dbpc; /* Grab server. */ XGrabServer(display); /* Enable synchronization. */ - (void) XSynchronize(display, True); + XSynchronize(display, True); /* Set input focus to parent window. */ XSetDeviceFocus(display, device, parent, RevertToPointerRoot, CurrentTime); /* Save initial pointer location. */ - (void) XQueryPointer(display, child, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); + XQueryPointer(display, child, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); /* Warp pointer to inferior of focus window. */ XWarpPointer(display, None, child, 0, 0, 0, 0, 0, 0); /* Get new pointer location. */ if (XQueryPointer(display, child, &wtmp, &wtmp, &oroot_x, &oroot_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer on wrong root."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } else @@ -434,7 +434,7 @@ XEventClass dbpc; /* Get current pointer location. */ if (XQueryPointer(display, child, &wtmp, &wtmp, &root_x, &root_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer moved."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } @@ -453,7 +453,7 @@ XEventClass dbpc; /* Warp pointer back to where it started. */ XWarpPointer(display, None, oldroot, 0, 0, 0, 0, sroot_x, sroot_y); /* Disable synchronization. */ - (void) XSynchronize(display, False); + XSynchronize(display, False); /* Ungrab server. */ XUngrabServer(display); /* Verify that XSendExtensionEvent returned non-zero. */ @@ -998,18 +998,18 @@ XEventClass noextensioneventclass, dbpc; /* Grab server. */ XGrabServer(display); /* Enable synchronization. */ - (void) XSynchronize(display, True); + XSynchronize(display, True); /* Set input focus to parent window. */ XSetDeviceFocus(display, Devs.Button, parent, RevertToPointerRoot, CurrentTime); /* Save initial pointer location. */ - (void) XQueryPointer(display, child, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); + XQueryPointer(display, child, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); /* Warp pointer to inferior of focus window. */ XWarpPointer(display, None, child, 0, 0, 0, 0, 0, 0); /* Get new pointer location. */ if (XQueryPointer(display, child, &wtmp, &wtmp, &oroot_x, &oroot_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer on wrong root."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } else @@ -1027,7 +1027,7 @@ XEventClass noextensioneventclass, dbpc; /* Get current pointer location. */ if (XQueryPointer(display, child, &wtmp, &wtmp, &root_x, &root_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer moved."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } @@ -1046,7 +1046,7 @@ XEventClass noextensioneventclass, dbpc; /* Warp pointer back to where it started. */ XWarpPointer(display, None, oldroot, 0, 0, 0, 0, sroot_x, sroot_y); /* Disable synchronization. */ - (void) XSynchronize(display, False); + XSynchronize(display, False); /* Ungrab server. */ XUngrabServer(display); /* Verify that XSendExtensionEvent returned non-zero. */ @@ -1154,18 +1154,18 @@ XEventClass noextensioneventclass, dbpc; /* Grab server. */ XGrabServer(display); /* Enable synchronization. */ - (void) XSynchronize(display, True); + XSynchronize(display, True); /* Set input focus to new focus window. */ XSetInputFocus(display, nfocus, RevertToPointerRoot, CurrentTime); /* Save initial pointer location. */ - (void) XQueryPointer(display, nfocus, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); + XQueryPointer(display, nfocus, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); /* Warp pointer away from inferior of focus window; to root. */ XWarpPointer(display, None, DRW(display), 0, 0, 0, 0, 0, 0); /* Get new pointer location. */ if (XQueryPointer(display, nfocus, &wtmp, &wtmp, &oroot_x, &oroot_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer on wrong root."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } else @@ -1185,7 +1185,7 @@ XEventClass noextensioneventclass, dbpc; /* Get current pointer location. */ if (XQueryPointer(display, nfocus, &wtmp, &wtmp, &root_x, &root_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer moved."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } @@ -1204,7 +1204,7 @@ XEventClass noextensioneventclass, dbpc; /* Warp pointer back to where it started. */ XWarpPointer(display, None, oldroot, 0, 0, 0, 0, sroot_x, sroot_y); /* Disable synchronization. */ - (void) XSynchronize(display, False); + XSynchronize(display, False); /* Ungrab server. */ XUngrabServer(display); /* Verify that XSendExtensionEvent returned non-zero. */ @@ -1229,18 +1229,18 @@ XEventClass noextensioneventclass, dbpc; /* Grab server. */ XGrabServer(display); /* Enable synchronization. */ - (void) XSynchronize(display, True); + XSynchronize(display, True); /* Set input focus to new focus window. */ XSetInputFocus(display, nfocus, RevertToPointerRoot, CurrentTime); /* Save initial pointer location. */ - (void) XQueryPointer(display, nfocus, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); + XQueryPointer(display, nfocus, &oldroot, &wtmp, &sroot_x, &sroot_y, &itmp, &itmp, &uitmp); /* Warp pointer away from inferior of focus window; to root. */ XWarpPointer(display, None, DRW(display), 0, 0, 0, 0, 0, 0); /* Get new pointer location. */ if (XQueryPointer(display, nfocus, &wtmp, &wtmp, &oroot_x, &oroot_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer on wrong root."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } else @@ -1251,7 +1251,7 @@ XEventClass noextensioneventclass, dbpc; /* Get current pointer location. */ if (XQueryPointer(display, nfocus, &wtmp, &wtmp, &root_x, &root_y, &itmp, &itmp, &uitmp) == False) { delete("Pointer moved."); - (void) XSynchronize(display, False); + XSynchronize(display, False); XUngrabServer(display); return; } @@ -1270,7 +1270,7 @@ XEventClass noextensioneventclass, dbpc; /* Warp pointer back to where it started. */ XWarpPointer(display, None, oldroot, 0, 0, 0, 0, sroot_x, sroot_y); /* Disable synchronization. */ - (void) XSynchronize(display, False); + XSynchronize(display, False); /* Ungrab server. */ XUngrabServer(display); /* Verify that XSendExtensionEvent returned non-zero. */ diff --git a/xts5/XI/SetDeviceButtonMapping.m b/xts5/XI/SetDeviceButtonMapping.m index adc5cacd..54b03ad7 100644 --- a/xts5/XI/SetDeviceButtonMapping.m +++ b/xts5/XI/SetDeviceButtonMapping.m @@ -158,7 +158,7 @@ restoremap() device = Devs.Button; if(Dsp && Devs.Button) { - (void) XSetDeviceButtonMapping(Dsp, device, oldmap, nbtns); + XSetDeviceButtonMapping(Dsp, device, oldmap, nbtns); XSync(Dsp,0); } cleanup(); @@ -200,7 +200,7 @@ int i; XCALL; - (void) XGetDeviceButtonMapping(display, device, newmap, MAPSIZE); + XGetDeviceButtonMapping(display, device, newmap, MAPSIZE); if (isdeleted()) { delete("Could not get device button mapping"); return; @@ -304,7 +304,7 @@ int dbp; win = defwin(display); device = Devs.Button; DeviceButtonPress(device, dbp, dbpclass); - (void) warppointer(display, win, 2,2); + warppointer(display, win, 2,2); XSelectExtensionEvent(display, win, &dbpclass, 1); for(i=0; i<nbtns; i++) { diff --git a/xts5/XI/XGetDeviceModifierMapping.m b/xts5/XI/XGetDeviceModifierMapping.m index e7b42b79..c4c29049 100644 --- a/xts5/XI/XGetDeviceModifierMapping.m +++ b/xts5/XI/XGetDeviceModifierMapping.m @@ -255,7 +255,7 @@ int non_zero = 0; return; } else CHECK; - (void) warppointer(display, win, 2,2); /* dgrabbed restores pointer */ + warppointer(display, win, 2,2); /* dgrabbed restores pointer */ for(k=minkc; k <= maxkc; k++) { devicekeypress(display, Devs.Mod, k); devicebuttonpress(display, Devs.Button, Button1); diff --git a/xts5/XI/XSetDeviceFocus.m b/xts5/XI/XSetDeviceFocus.m index 5ecd6550..181c61c8 100644 --- a/xts5/XI/XSetDeviceFocus.m +++ b/xts5/XI/XSetDeviceFocus.m @@ -166,7 +166,7 @@ XEventClass classes[2]; XSelectExtensionEvent(display, win, classes, 2); focus = None; XCALL; - (void) warppointer(display, win, 2, 2); + warppointer(display, win, 2, 2); XSync(display, True); /* clear out event queue */ devicekeypress(display, device, MinKeyCode); if (n=getevent(display, &ev)) /* assignment intentional */ { @@ -346,7 +346,7 @@ XEventClass classes[2], nevclass; trace("Test with toplevel window and PointerRoot."); focus = PointerRoot; XCALL; - (void) warppointer(display, win, 2, 2); + warppointer(display, win, 2, 2); XSync(display, True); /* clear out event queue */ devicekeypress(display, device, MinKeyCode); if (!getevent(display, &ev)) { @@ -362,7 +362,7 @@ XEventClass classes[2], nevclass; } else CHECK; trace("Test with root and PointerRoot."); - (void) warppointer(display, root, 0,0); + warppointer(display, root, 0,0); XSync(display, True); /* clear out event queue */ devicekeyrel(display, device, MinKeyCode); if (!getevent(display, &ev)) { @@ -383,7 +383,7 @@ XEventClass classes[2], nevclass; trace("Testing with root of alternate screen as source (0x%x) and PointerRoot.", (unsigned)altroot); XSelectExtensionEvent(display, altroot, classes, 2); - (void) warppointer(display, altroot, 0,0); + warppointer(display, altroot, 0,0); XSync(display, True); /* clear out event queue */ devicekeypress(display, device, MinKeyCode); devicekeyrel(display, device, MinKeyCode); @@ -622,7 +622,7 @@ XEventClass classes[2], nevclass; focus = crechild(display, base, (struct area *)0); revert_to = RevertToPointerRoot; - (void) warppointer(display, DRW(display), 0, 0); + warppointer(display, DRW(display), 0, 0); if (isdeleted()) return; @@ -781,7 +781,7 @@ XEventClass classes[2]; focus = crechild(display, base, (struct area *)0); revert_to = RevertToFollowKeyboard; - (void) warppointer(display, DRW(display), 0, 0); + warppointer(display, DRW(display), 0, 0); if (isdeleted()) return; @@ -934,7 +934,7 @@ XEventClass classes[2]; focus = crechild(display, base, (struct area *)0); revert_to = RevertToNone; - (void) warppointer(display, DRW(display), 0, 0); + warppointer(display, DRW(display), 0, 0); if (isdeleted()) return; diff --git a/xts5/XI/XUngrabDevice.m b/xts5/XI/XUngrabDevice.m index d8f3bf7d..864adea7 100644 --- a/xts5/XI/XUngrabDevice.m +++ b/xts5/XI/XUngrabDevice.m @@ -148,7 +148,7 @@ int dkp, dkr; } else CHECK; - (void) warppointer(display, win, 10, 10); + warppointer(display, win, 10, 10); XSync(display,1); devicekeypress(display, Devs.Key, MinKeyCode); devicekeyrel(display, Devs.Key, MinKeyCode); @@ -170,7 +170,7 @@ int dkp, dkr; FAIL; } else { first = ev.type; - (void) getevent(display, &ev); + getevent(display, &ev); if (ev.type != dkp && first != dkp) { report("Did not get DeviceKeyPress event after releasing grab"); @@ -186,7 +186,7 @@ int dkp, dkr; win = defwin(display); XSelectExtensionEvent(display, win, &dkclass[0], 1); - (void) warppointer(display, win, 5, 5); + warppointer(display, win, 5, 5); devicekeypress(display, Devs.Key, MinKeyCode); if (XPending(display)) { XNextEvent(display, &ev); @@ -230,8 +230,8 @@ XEvent ev; win = defwin(display); XSelectInput(display, win, PointerMotionMask); - (void) warppointer(display, win, 0, 0); - (void) warppointer(display, win, 1, 1); + warppointer(display, win, 0, 0); + warppointer(display, win, 1, 1); if (XCheckWindowEvent(display, win, PointerMotionMask, &ev)) return(False); |