11b5d61b8Smrg 21b5d61b8Smrg#ifdef HAVE_DIX_CONFIG_H 31b5d61b8Smrg#include <dix-config.h> 41b5d61b8Smrg#endif 51b5d61b8Smrg 61b5d61b8Smrg#ifdef HAVE_XORG_CONFIG_H 71b5d61b8Smrg#include <xorg-config.h> 81b5d61b8Smrg#endif 91b5d61b8Smrg 101b5d61b8Smrg#include <stdio.h> 111b5d61b8Smrg#include <X11/X.h> 121b5d61b8Smrg#include "windowstr.h" 131b5d61b8Smrg#define XKBSRV_NEED_FILE_FUNCS 141b5d61b8Smrg#include <xkbsrv.h> 151b5d61b8Smrg 161b5d61b8Smrg#include "dixgrabs.h" 171b5d61b8Smrg#include "os.h" 181b5d61b8Smrg#include "xf86.h" 191b5d61b8Smrg 201b5d61b8Smrgint 211b5d61b8SmrgXkbDDXPrivate(DeviceIntPtr dev, KeyCode key, XkbAction *act) 221b5d61b8Smrg{ 231b5d61b8Smrg XkbAnyAction *xf86act = &(act->any); 241b5d61b8Smrg char msgbuf[XkbAnyActionDataSize + 1]; 251b5d61b8Smrg 261b5d61b8Smrg if (xf86act->type == XkbSA_XFree86Private) { 271b5d61b8Smrg memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize); 281b5d61b8Smrg msgbuf[XkbAnyActionDataSize] = '\0'; 291b5d61b8Smrg if (strcasecmp(msgbuf, "-vmode") == 0) 301b5d61b8Smrg xf86ProcessActionEvent(ACTION_PREV_MODE, NULL); 311b5d61b8Smrg else if (strcasecmp(msgbuf, "+vmode") == 0) 321b5d61b8Smrg xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL); 331b5d61b8Smrg } 341b5d61b8Smrg 351b5d61b8Smrg return 0; 361b5d61b8Smrg} 37