aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xkb')
-rw-r--r--xorg-server/xkb/ddxList.c7
-rw-r--r--xorg-server/xkb/ddxLoad.c4
-rw-r--r--xorg-server/xkb/makefile42
-rw-r--r--xorg-server/xkb/xkb.c2
-rw-r--r--xorg-server/xkb/xkbActions.c9
-rw-r--r--xorg-server/xkb/xkbInit.c4
6 files changed, 61 insertions, 7 deletions
diff --git a/xorg-server/xkb/ddxList.c b/xorg-server/xkb/ddxList.c
index 16bca16db..f23effa97 100644
--- a/xorg-server/xkb/ddxList.c
+++ b/xorg-server/xkb/ddxList.c
@@ -212,7 +212,12 @@ char tmpname[PATH_MAX];
free(buf);
buf = malloc(PATH_MAX * sizeof(char));
if (!buf)
- return BadAlloc;
+ {
+#ifdef WIN32
+ unlink(tmpname);
+#endif
+ return BadAlloc;
+ }
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
unsigned flags;
register unsigned int i;
diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c
index 6742537e7..127180a34 100644
--- a/xorg-server/xkb/ddxLoad.c
+++ b/xorg-server/xkb/ddxLoad.c
@@ -269,6 +269,10 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
}
if (buf != NULL)
free(buf);
+#ifdef WIN32
+ /* remove the temporary file */
+ unlink(tmpname);
+#endif
return TRUE;
}
else
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 0f6daa573..755e6f994 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -5588,6 +5588,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);
xkb = dev->key->xkbInfo->desc;
diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c
index 11c52c3c2..7a5f2b241 100644
--- a/xorg-server/xkb/xkbActions.c
+++ b/xorg-server/xkb/xkbActions.c
@@ -957,15 +957,15 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi,
DeviceIntPtr dev;
int button;
- if (xkbi->device == inputInfo.keyboard)
- return 0;
-
if (filter->keycode==0) { /* initial press */
_XkbLookupButtonDevice(&dev, pAction->devbtn.device, serverClient,
DixUnknownAccess, &button);
if (!dev || !dev->public.on)
return 1;
+ if (xkbi->device == inputInfo.keyboard)
+ return 0;
+
button= pAction->devbtn.button;
if ((button<1)||(button>dev->button->numButtons))
return 1;
@@ -1394,6 +1394,7 @@ static void
XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y)
{
int gpe_flags = 0;
+ int Point[]={x, y};
/* ignore attached SDs */
if (!IsMaster(dev) && GetMaster(dev, MASTER_POINTER) != NULL)
@@ -1404,7 +1405,7 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y)
else
gpe_flags = POINTER_RELATIVE;
- InjectPointerKeyEvents(dev, MotionNotify, 0, gpe_flags, 2, (int[]){x, y});
+ InjectPointerKeyEvents(dev, MotionNotify, 0, gpe_flags, 2, Point);
}
void
diff --git a/xorg-server/xkb/xkbInit.c b/xorg-server/xkb/xkbInit.c
index 6defefa50..98483857c 100644
--- a/xorg-server/xkb/xkbInit.c
+++ b/xorg-server/xkb/xkbInit.c
@@ -88,8 +88,8 @@ typedef struct _SrvXkmInfo {
#define XKB_DFLT_RULES_PROP TRUE
#endif
-char * XkbBaseDirectory= XKB_BASE_DIRECTORY;
-char * XkbBinDirectory= XKB_BIN_DIRECTORY;
+const char * XkbBaseDirectory= XKB_BASE_DIRECTORY;
+const char * XkbBinDirectory= XKB_BIN_DIRECTORY;
static int XkbWantAccessX= 0;
static char * XkbRulesDflt= NULL;