summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorDaniel Stone <daniel.stone@nokia.com>2006-07-19 17:06:00 -0400
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-07-21 15:16:42 -0400
commitf8a7a1e40c14a85ebde11c5854c07a8d529d38b9 (patch)
tree8d06c3e8616be026b58420597bca1bd0e75ebee4 /Xext
parent985c34bf06af70a7296db8307899a17347a25558 (diff)
fix XEvIE build without XKB
Don't unconditionally play with XKB stuff in XEvIE.
Diffstat (limited to 'Xext')
-rw-r--r--Xext/xevie.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/Xext/xevie.c b/Xext/xevie.c
index ccc12371a..41fdd1d4b 100644
--- a/Xext/xevie.c
+++ b/Xext/xevie.c
@@ -59,7 +59,9 @@ of the copyright holder.
#define NoSuchEvent 0x80000000
+#ifdef XKB
extern Bool noXkbExtension;
+#endif
extern int xeviegrabState;
static int ProcDispatch (register ClientPtr client), SProcDispatch (register ClientPtr client);
@@ -201,12 +203,14 @@ int ProcStart (register ClientPtr client)
return BadAlloc;
} else
return BadAccess;
+#ifdef XKB
if (!noXkbExtension) {
if (!XevieStart()) {
DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL);
return BadAlloc;
}
}
+#endif
xevieModifiersOn = FALSE;
@@ -255,19 +259,23 @@ int ProcSend (register ClientPtr client)
case KeyPress:
case KeyRelease:
xevieKBEventSent = 1;
- if(noXkbExtension)
- CoreProcessKeyboardEvent (xE, xeviekb, 1);
- else
+#ifdef XKB
+ if(!noXkbExtension)
doSendEvent(xE, inputInfo.keyboard);
+ else
+#endif
+ CoreProcessKeyboardEvent (xE, xeviekb, 1);
break;
case ButtonPress:
case ButtonRelease:
case MotionNotify:
xevieEventSent = 1;
- if(noXkbExtension)
- CoreProcessPointerEvent(xE, xeviemouse, 1);
- else
+#ifdef XKB
+ if(!noXkbExtension)
doSendEvent(xE, inputInfo.pointer);
+ else
+#endif
+ CoreProcessPointerEvent(xE, xeviemouse, 1);
break;
default:
break;
@@ -464,6 +472,7 @@ XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count)
xE->u.keyButtonPointer.state = keyc->state | inputInfo.pointer->button->state;
/* fix bug: sequence lost in Xlib */
xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence;
+#ifdef XKB
/* fix for bug5092586 */
if(!noXkbExtension) {
switch(xE->u.u.type) {
@@ -471,6 +480,7 @@ XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count)
case KeyRelease: *kptr &= ~bit; break;
}
}
+#endif
keycq[keycqHead].time = xE->u.keyButtonPointer.time;
memcpy(keycq[keycqHead].keyc, keyc, sizeof(KeyClassRec) - sizeof(KeyClassPtr));
memcpy(keycq[keycqHead].keyc->xkbInfo, keyc->xkbInfo, sizeof(XkbSrvInfoRec));
@@ -525,6 +535,7 @@ XevieEnd(int clientIndex)
{
if (!clientIndex || clientIndex == xevieClientIndex) {
+#ifdef XKB
if(!noXkbExtension) {
XevieRemove(inputInfo.keyboard,NULL);
@@ -540,6 +551,7 @@ XevieEnd(int clientIndex)
inputInfo.pointer->public.realInputProc = CoreProcessPointerEvent;
XkbSetExtension(inputInfo.pointer,ProcessPointerEvent);
}
+#endif
xevieFlag = 0;
xevieClientIndex = 0;