summaryrefslogtreecommitdiff
path: root/xkb/ddxPrivate.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkb/ddxPrivate.c')
-rw-r--r--xkb/ddxPrivate.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/xkb/ddxPrivate.c b/xkb/ddxPrivate.c
index 880efed4b..dd7ef4630 100644
--- a/xkb/ddxPrivate.c
+++ b/xkb/ddxPrivate.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/xkb/ddxPrivate.c,v 1.1 2002/11/20 04:49:02 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxPrivate.c,v 1.3 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -12,25 +12,15 @@
#endif
int
-#if NeedFunctionPrototypes
XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
-#else
-XkbDDXPrivate(dev,key,act)
- DeviceIntPtr dev;
- KeyCode key;
- XkbAction *act;
-#endif
{
#ifdef XF86DDXACTIONS
- XkbMessageAction *msgact = &(act->msg);
- char msgbuf[7];
- int x;
+ XkbAnyAction *xf86act = &(act->any);
+ char msgbuf[XkbAnyActionDataSize+1];
- if (msgact->type == XkbSA_XFree86Private) {
- msgbuf[0]= msgact->flags;
- for (x=0; x<5; x++)
- msgbuf[x+1] = msgact->message[x];
- msgbuf[6]= '\0';
+ if (xf86act->type == XkbSA_XFree86Private) {
+ memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
+ msgbuf[XkbAnyActionDataSize]= '\0';
if (_XkbStrCaseCmp(msgbuf, "-vmode")==0)
xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
else if (_XkbStrCaseCmp(msgbuf, "+vmode")==0)
@@ -39,6 +29,8 @@ XkbDDXPrivate(dev,key,act)
xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL);
else if (_XkbStrCaseCmp(msgbuf, "clsgrb")==0)
xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL);
+ else
+ xf86ProcessActionEvent(ACTION_MESSAGE, (void *) msgbuf);
}
#endif
return 0;