aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xkb')
-rw-r--r--xorg-server/xkb/ddxPrivate.c32
-rw-r--r--xorg-server/xkb/makefile42
-rw-r--r--xorg-server/xkb/xkb.c2
-rw-r--r--xorg-server/xkb/xkbActions.c5
-rw-r--r--xorg-server/xkb/xkbInit.c4
5 files changed, 81 insertions, 4 deletions
diff --git a/xorg-server/xkb/ddxPrivate.c b/xorg-server/xkb/ddxPrivate.c
index f1c85f6ea..c4bcab437 100644
--- a/xorg-server/xkb/ddxPrivate.c
+++ b/xorg-server/xkb/ddxPrivate.c
@@ -3,12 +3,44 @@
#include <dix-config.h>
#endif
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <stdio.h>
#include <X11/X.h>
#include "windowstr.h"
+#define XKBSRV_NEED_FILE_FUNCS
#include <xkbsrv.h>
+#include "dixgrabs.h"
+#include "os.h"
+#include "xf86.h"
+
int
XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
{
+ XkbAnyAction *xf86act = &(act->any);
+ char msgbuf[XkbAnyActionDataSize+1];
+
+ if (xf86act->type == XkbSA_XFree86Private) {
+ memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
+ msgbuf[XkbAnyActionDataSize]= '\0';
+ if (strcasecmp(msgbuf, "prgrbs")==0) {
+ DeviceIntPtr tmp;
+ ErrorF("Printing all currently active device grabs:\n");
+ for (tmp = inputInfo.devices; tmp; tmp = tmp->next)
+ if (tmp->deviceGrab.grab)
+ PrintDeviceGrabInfo(tmp);
+ ErrorF("End list of active device grabs\n");
+ }
+ else if (strcasecmp(msgbuf, "ungrab")==0)
+ UngrabAllDevices(FALSE);
+ else if (strcasecmp(msgbuf, "clsgrb")==0)
+ UngrabAllDevices(TRUE);
+ else if (strcasecmp(msgbuf, "prwins")==0)
+ PrintWindowTree();
+ }
+
return 0;
}
diff --git a/xorg-server/xkb/makefile b/xorg-server/xkb/makefile
new file mode 100644
index 000000000..e04599e52
--- /dev/null
+++ b/xorg-server/xkb/makefile
@@ -0,0 +1,42 @@
+DEFINES += HAVE_XKB_CONFIG_H
+
+DDX_SRCS = \
+ ddxBeep.c \
+ ddxCtrls.c \
+ ddxLEDs.c \
+ ddxLoad.c \
+ ddxList.c
+
+DIX_SRCS = \
+ xkb.c \
+ xkbUtils.c \
+ xkbEvents.c \
+ xkbAccessX.c \
+ xkbSwap.c \
+ xkbLEDs.c \
+ xkbInit.c \
+ xkbActions.c \
+ xkbPrKeyEv.c
+
+# this should be replaced by a common library or something, ideally -d
+XKBFILE_SRCS = \
+ maprules.c \
+ xkmread.c \
+ xkbtext.c \
+ xkbfmisc.c \
+ xkbout.c
+
+X11_SRCS = \
+ XKBMisc.c \
+ XKBAlloc.c \
+ XKBGAlloc.c \
+ XKBMAlloc.c
+
+# ends up unused...
+# XI_SRCS = xkbPrOtherEv.c
+
+CSRCS = $(DDX_SRCS) $(DIX_SRCS) $(XI_SRCS) $(XKBFILE_SRCS) \
+ $(X11_SRCS) ddxVT.c ddxPrivate.c ddxKillSrv.c
+
+LIBRARY=libxkb
+
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c
index 0bec24f63..dc15e5de3 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -5708,6 +5708,8 @@ ProcXkbGetKbdByName(ClientPtr client)
if (!(client->xkbClientFlags & _XkbClientInitialized))
return BadAccess;
+ memset(&mrep,0,sizeof(mrep)); //MH
+
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
master = GetMaster(dev, MASTER_KEYBOARD);
diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c
index 5ec1ed5c6..323886274 100644
--- a/xorg-server/xkb/xkbActions.c
+++ b/xorg-server/xkb/xkbActions.c
@@ -1426,6 +1426,7 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags, int x, int y)
{
ValuatorMask mask;
int gpe_flags = 0;
+ int Point[]={x, y};
/* ignore attached SDs */
if (!IsMaster(dev) && !IsFloating(dev))
@@ -1436,8 +1437,8 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags, int x, int y)
else
gpe_flags = POINTER_RELATIVE;
- valuator_mask_set_range(&mask, 0, 2, (int[]) {
- x, y});
+ valuator_mask_set_range(&mask, 0, 2,
+ Point);
InjectPointerKeyEvents(dev, MotionNotify, 0, gpe_flags, &mask);
}
diff --git a/xorg-server/xkb/xkbInit.c b/xorg-server/xkb/xkbInit.c
index 4e8e267da..861c2815d 100644
--- a/xorg-server/xkb/xkbInit.c
+++ b/xorg-server/xkb/xkbInit.c
@@ -670,7 +670,7 @@ extern int XkbDfltRepeatInterval;
extern unsigned short XkbDfltAccessXTimeout;
extern unsigned int XkbDfltAccessXTimeoutMask;
extern unsigned int XkbDfltAccessXFeedback;
-extern unsigned char XkbDfltAccessXOptions;
+extern unsigned short XkbDfltAccessXOptions;
int
XkbProcessArguments(int argc, char *argv[], int i)
@@ -731,7 +731,7 @@ XkbProcessArguments(int argc, char *argv[], int i)
j++;
}
if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
- XkbDfltAccessXOptions = (unsigned char)
+ XkbDfltAccessXOptions=(unsigned short)
strtol(argv[++i], NULL, 16);
j++;
}