aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xkb')
-rw-r--r--xorg-server/xkb/ddxList.c5
-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.c3
-rw-r--r--xorg-server/xkb/xkbInit.c8
6 files changed, 58 insertions, 6 deletions
diff --git a/xorg-server/xkb/ddxList.c b/xorg-server/xkb/ddxList.c
index 3d301d88e..7aebd3b17 100644
--- a/xorg-server/xkb/ddxList.c
+++ b/xorg-server/xkb/ddxList.c
@@ -224,7 +224,10 @@ char tmpname[PATH_MAX];
buf = malloc(PATH_MAX * sizeof(char));
if (!buf) {
fclose(in);
- return BadAlloc;
+#ifdef WIN32
+ unlink(tmpname);
+#endif
+ return BadAlloc;
}
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
unsigned flags;
diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c
index e1020358a..ee442d492 100644
--- a/xorg-server/xkb/ddxLoad.c
+++ b/xorg-server/xkb/ddxLoad.c
@@ -267,6 +267,10 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
nameRtrn[nameRtrnLen-1]= '\0';
}
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 9c66955f4..203e4609b 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -5628,6 +5628,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 4b5405ab0..529b53c37 100644
--- a/xorg-server/xkb/xkbActions.c
+++ b/xorg-server/xkb/xkbActions.c
@@ -1388,6 +1388,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))
@@ -1398,7 +1399,7 @@ 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 3d3febb4f..328c5aa0b 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;
@@ -678,7 +678,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)
@@ -735,7 +735,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++;
}