summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-09-26 18:04:59 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-09-26 18:04:59 +0930
commit8f9bf927e1beecf9b9ec8877131ec12c765e4d84 (patch)
tree14aa779558d0fc8536b185962eea80e4f3af84ae /xkb
parent3342b5ad47be25c6838321c0aafc28c329c308b5 (diff)
xkb: Unwrap properly in ProcessPointerEvent.
Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly and then call the unwrapped processInputProc. Seems to be a better idea, especially since it makes stuff actually work...
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbAccessX.c25
-rw-r--r--xkb/xkbActions.c4
2 files changed, 26 insertions, 3 deletions
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 8e897c86c..063c84423 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -684,6 +684,8 @@ Bool ignoreKeyEvent = FALSE;
/* don't accidentally turn on StickyKeys or the Keyboard Response Group.*/
/* */
/************************************************************************/
+extern int xkbDevicePrivateIndex;
+extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
void
ProcessPointerEvent( register xEvent * xE,
register DeviceIntPtr mouse,
@@ -692,6 +694,8 @@ ProcessPointerEvent( register xEvent * xE,
DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice();
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
unsigned changed = 0;
+ProcessInputProc backupproc;
+xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse);
xkbi->shiftKeyCount = 0;
xkbi->lastPtrEventTime= xE->u.keyButtonPointer.time;
@@ -703,7 +707,26 @@ unsigned changed = 0;
xkbi->lockedPtrButtons&= ~(1<<(xE->u.u.detail&0x7));
changed |= XkbPointerButtonMask;
}
- CoreProcessPointerEvent(xE,mouse,count);
+
+ /* Guesswork. mostly.
+ * xkb actuall goes through some effort to transparently wrap the
+ * processInputProcs (see XkbSetExtension). But we all love fun, so the
+ * previous XKB implementation just hardcoded the CPPE call here instead
+ * of unwrapping like anybody with any sense of decency would do.
+ * I got no clue what the correct thing to do is, but my guess is that
+ * it's not hardcoding. I may be wrong. whatever it is, don't come whining
+ * to me. I just work here.
+ *
+ * Anyway. here's the old call, if you don't like the wrapping, revert it.
+ *
+ * CoreProcessPointerEvent(xE,mouse,count);
+ *
+ * see. it's still steaming. told you. (whot)
+ */
+ UNWRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc);
+ mouse->public.processInputProc(xE, mouse, count);
+ COND_WRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr,
+ backupproc, xkbUnwrapProc);
xkbi->state.ptr_buttons = mouse->button->state;
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index e51b0cca9..cc707bd44 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -42,9 +42,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define EXTENSION_EVENT_BASE 64
static unsigned int _xkbServerGeneration;
-static int xkbDevicePrivateIndex = -1;
+int xkbDevicePrivateIndex = -1;
-static void
+void
xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc,
pointer data)
{