diff options
author | Daniel Stone <daniel@fooishbar.org> | 2006-10-29 03:43:34 +0300 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2006-10-29 03:43:34 +0300 |
commit | 96e32805d12fc36f0fa0926dbfb0dd8a5cadb739 (patch) | |
tree | 0a1a92660a406ac0631298d861a6da8258eb1ee0 /Xi/stubs.c | |
parent | 68f595ca6c7883e030947b7f95c50e92aa733f2b (diff) |
Xi: disallow changing core keyboard and pointer
Just short-circuit the change core keyboard/pointer requests.
Diffstat (limited to 'Xi/stubs.c')
-rw-r--r-- | Xi/stubs.c | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/Xi/stubs.c b/Xi/stubs.c index 28ecd8bd2..e2ed1ceff 100644 --- a/Xi/stubs.c +++ b/Xi/stubs.c @@ -68,86 +68,6 @@ SOFTWARE. /*********************************************************************** * - * Caller: ProcXChangeKeyboardDevice - * - * This procedure does the implementation-dependent portion of the work - * needed to change the keyboard device. - * - * The X keyboard device has a FocusRec. If the device that has been - * made into the new X keyboard did not have a FocusRec, - * ProcXChangeKeyboardDevice will allocate one for it. - * - * If you do not want clients to be able to focus the old X keyboard - * device, call DeleteFocusClassDeviceStruct to free the FocusRec. - * - * If you support input devices with keys that you do not want to be - * used as the X keyboard, you need to check for them here and return - * a BadDevice error. - * - * The default implementation is to do nothing (assume you do want - * clients to be able to focus the old X keyboard). The commented-out - * sample code shows what you might do if you don't want the default. - * - */ - -int -ChangeKeyboardDevice(DeviceIntPtr old_dev, DeviceIntPtr new_dev) -{ - /*********************************************************************** - DeleteFocusClassDeviceStruct(old_dev); * defined in xchgptr.c * - **********************************************************************/ - return BadMatch; -} - -/*********************************************************************** - * - * Caller: ProcXChangePointerDevice - * - * This procedure does the implementation-dependent portion of the work - * needed to change the pointer device. - * - * The X pointer device does not have a FocusRec. If the device that - * has been made into the new X pointer had a FocusRec, - * ProcXChangePointerDevice will free it. - * - * If you want clients to be able to focus the old pointer device that - * has now become accessible through the input extension, you need to - * add a FocusRec to it here. - * - * The XChangePointerDevice protocol request also allows the client - * to choose which axes of the new pointer device are used to move - * the X cursor in the X- and Y- directions. If the axes are different - * than the default ones, you need to keep track of that here. - * - * If you support input devices with valuators that you do not want to be - * used as the X pointer, you need to check for them here and return a - * BadDevice error. - * - * The default implementation is to do nothing (assume you don't want - * clients to be able to focus the old X pointer). The commented-out - * sample code shows what you might do if you don't want the default. - * - */ - -int -ChangePointerDevice(DeviceIntPtr old_dev, - DeviceIntPtr new_dev, unsigned char x, unsigned char y) -{ - /*********************************************************************** - InitFocusClassDeviceStruct(old_dev); * allow focusing old ptr* - - x_axis = x; * keep track of new x-axis* - y_axis = y; * keep track of new y-axis* - if (x_axis != 0 || y_axis != 1) - axes_changed = TRUE; * remember axes have changed* - else - axes_changed = FALSE; - *************************************************************************/ - return BadMatch; -} - -/*********************************************************************** - * * Caller: ProcXCloseDevice * * Take care of implementation-dependent details of closing a device. |