aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-02 09:01:55 +0200
committermarha <marha@users.sourceforge.net>2012-05-02 09:01:55 +0200
commit3d353f31ac1671d1b39c09b1f8d82c8811d3edd6 (patch)
treece19dbcec75ce7e87547f6f9b3495888aaea0966 /xorg-server
parentb2a0f04a2984b290c1224fc1b1883d08b01a6231 (diff)
parente67b35e7a899da5805fcce3d390cb10ebcaffe91 (diff)
downloadvcxsrv-3d353f31ac1671d1b39c09b1f8d82c8811d3edd6.tar.gz
vcxsrv-3d353f31ac1671d1b39c09b1f8d82c8811d3edd6.tar.bz2
vcxsrv-3d353f31ac1671d1b39c09b1f8d82c8811d3edd6.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/os/connection.c
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xi/xiqueryversion.c41
-rw-r--r--xorg-server/dix/devices.c1
-rw-r--r--xorg-server/dix/getevents.c3
-rw-r--r--xorg-server/dix/globals.c1
-rw-r--r--xorg-server/dix/touch.c5
-rw-r--r--xorg-server/hw/dmx/dmxlog.c13
-rw-r--r--xorg-server/hw/dmx/dmxlog.h19
-rw-r--r--xorg-server/include/opaque.h1
-rw-r--r--xorg-server/man/Xserver.man7
-rw-r--r--xorg-server/os/WaitFor.c18
-rw-r--r--xorg-server/os/connection.c73
-rw-r--r--xorg-server/os/utils.c9
-rw-r--r--xorg-server/test/Makefile.am2
-rw-r--r--xorg-server/test/xi2/protocol-xiqueryversion.c113
-rw-r--r--xorg-server/xkeyboard-config/symbols/dk1
-rw-r--r--xorg-server/xkeyboard-config/symbols/latin2
-rw-r--r--xorg-server/xkeyboard-config/symbols/me18
17 files changed, 269 insertions, 58 deletions
diff --git a/xorg-server/Xi/xiqueryversion.c b/xorg-server/Xi/xiqueryversion.c
index fc0ca751b..6081c413d 100644
--- a/xorg-server/Xi/xiqueryversion.c
+++ b/xorg-server/Xi/xiqueryversion.c
@@ -70,28 +70,29 @@ ProcXIQueryVersion(ClientPtr client)
pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
- if (pXIClient->major_version &&
- (stuff->major_version != pXIClient->major_version ||
- stuff->minor_version != pXIClient->minor_version))
- {
- client->errorValue = stuff->major_version;
- return BadValue;
+ if (pXIClient->major_version) {
+ if (version_compare(stuff->major_version, stuff->minor_version,
+ pXIClient->major_version, pXIClient->minor_version) < 0) {
+ client->errorValue = stuff->major_version;
+ return BadValue;
+ }
+ major = pXIClient->major_version;
+ minor = pXIClient->minor_version;
+ } else {
+ if (version_compare(XIVersion.major_version, XIVersion.minor_version,
+ stuff->major_version, stuff->minor_version) > 0) {
+ major = stuff->major_version;
+ minor = stuff->minor_version;
+ }
+ else {
+ major = XIVersion.major_version;
+ minor = XIVersion.minor_version;
+ }
+
+ pXIClient->major_version = major;
+ pXIClient->minor_version = minor;
}
-
- if (version_compare(XIVersion.major_version, XIVersion.minor_version,
- stuff->major_version, stuff->minor_version) > 0) {
- major = stuff->major_version;
- minor = stuff->minor_version;
- }
- else {
- major = XIVersion.major_version;
- minor = XIVersion.minor_version;
- }
-
- pXIClient->major_version = major;
- pXIClient->minor_version = minor;
-
memset(&rep, 0, sizeof(xXIQueryVersionReply));
rep.repType = X_Reply;
rep.RepType = X_XIQueryVersion;
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index d5ad08e16..21179ee59 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -441,6 +441,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
if (*prev != dev)
return FALSE;
+ ReleaseButtonsAndKeys(dev);
SyncRemoveDeviceIdleTime(dev->idle_counter);
dev->idle_counter = NULL;
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 0a6a997ca..e0ef18365 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -1619,6 +1619,9 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
/* Now turn the smooth-scrolling axes back into emulated button presses
* for legacy clients, based on the integer delta between before and now */
for (i = 0; i < valuator_mask_size(&mask); i++) {
+ if (i >= pDev->valuator->numAxes)
+ break;
+
if (!valuator_mask_isset(&mask, i))
continue;
diff --git a/xorg-server/dix/globals.c b/xorg-server/dix/globals.c
index a564575f3..332b91f5c 100644
--- a/xorg-server/dix/globals.c
+++ b/xorg-server/dix/globals.c
@@ -128,6 +128,7 @@ int defaultColorVisualClass = -1;
int monitorResolution = 0;
char *display;
+int displayfd;
char *ConnectionInfo;
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
diff --git a/xorg-server/dix/touch.c b/xorg-server/dix/touch.c
index dd16367d0..401cb981a 100644
--- a/xorg-server/dix/touch.c
+++ b/xorg-server/dix/touch.c
@@ -966,6 +966,11 @@ TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener,
int nev;
int i;
+ BUG_WARN(listener < 0);
+ BUG_WARN(listener >= ti->num_listeners);
+ if (listener < 0 || listener >= ti->num_listeners)
+ return BadMatch;
+
if (listener > 0) {
if (mode == XIRejectTouch)
TouchRejected(dev, ti, ti->listeners[listener].listener, NULL);
diff --git a/xorg-server/hw/dmx/dmxlog.c b/xorg-server/hw/dmx/dmxlog.c
index 33aee590a..3249c4867 100644
--- a/xorg-server/hw/dmx/dmxlog.c
+++ b/xorg-server/hw/dmx/dmxlog.c
@@ -86,6 +86,8 @@ ErrorF(const char *format, ...)
/** Provide an VFatalError function when used stand-alone. */
static void
+VFatalError(const char *format, va_list args) _X_ATTRIBUTE_PRINTF(1, 0) _X_NORETURN;
+static void
VFatalError(const char *format, va_list args)
{
vfprintf(stderr, format, args); /* RATS: We assume the format string
@@ -104,7 +106,9 @@ VErrorF(const char *format, va_list args)
}
#else
/** This function was removed between XFree86 4.3.0 and XFree86 4.4.0. */
-extern void AbortServer(void);
+extern void AbortServer(void) _X_NORETURN;
+static void
+VFatalError(const char *format, va_list args) _X_ATTRIBUTE_PRINTF(1, 0) _X_NORETURN;
static void
VFatalError(const char *format, va_list args)
{
@@ -163,6 +167,8 @@ dmxHeader(dmxLogLevel logLevel, DMXInputInfo * dmxInput,
/* Prints the error message with the appropriate low-level X output
* routine. */
static void
+dmxMessage(dmxLogLevel logLevel, const char *format, va_list args) _X_ATTRIBUTE_PRINTF(2, 0);
+static void
dmxMessage(dmxLogLevel logLevel, const char *format, va_list args)
{
if (logLevel == dmxFatal || logLevel >= dmxCurrentLogLevel) {
@@ -300,10 +306,11 @@ dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi, int defaultVisual)
class = "DirectColor";
break;
}
+#define VisualLogFormat "0x%02lx %s %2db %db/rgb %3d 0x%04lx 0x%04lx 0x%04lx%s\n"
if (dmxScreen) {
dmxLogOutput(dmxScreen,
- "0x%02x %s %2db %db/rgb %3d 0x%04x 0x%04x 0x%04x%s\n",
+ VisualLogFormat,
vi->visualid, class, vi->depth, vi->bits_per_rgb,
vi->colormap_size,
vi->red_mask, vi->green_mask, vi->blue_mask,
@@ -311,7 +318,7 @@ dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi, int defaultVisual)
}
else {
dmxLog(dmxInfo,
- " 0x%02x %s %2db %db/rgb %3d 0x%04x 0x%04x 0x%04x%s\n",
+ " " VisualLogFormat,
vi->visualid, class, vi->depth, vi->bits_per_rgb,
vi->colormap_size,
vi->red_mask, vi->green_mask, vi->blue_mask,
diff --git a/xorg-server/hw/dmx/dmxlog.h b/xorg-server/hw/dmx/dmxlog.h
index 4d4cd269a..162484b34 100644
--- a/xorg-server/hw/dmx/dmxlog.h
+++ b/xorg-server/hw/dmx/dmxlog.h
@@ -55,18 +55,23 @@ typedef enum {
/* Logging functions used by Xserver/hw/dmx routines. */
extern dmxLogLevel dmxSetLogLevel(dmxLogLevel newLevel);
extern dmxLogLevel dmxGetLogLevel(void);
-extern void dmxLog(dmxLogLevel logLevel, const char *format, ...);
-extern void dmxLogCont(dmxLogLevel logLevel, const char *format, ...);
+extern void dmxLog(dmxLogLevel logLevel, const char *format,
+ ...) _X_ATTRIBUTE_PRINTF(2, 3);
+extern void dmxLogCont(dmxLogLevel logLevel, const char *format,
+ ...) _X_ATTRIBUTE_PRINTF(2, 3);
extern const char *dmxEventName(int type);
#ifndef DMX_LOG_STANDALONE
-extern void dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format, ...);
+extern void dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format,
+ ...) _X_ATTRIBUTE_PRINTF(2, 3);
extern void dmxLogOutputCont(DMXScreenInfo * dmxScreen, const char *format,
- ...);
+ ...) _X_ATTRIBUTE_PRINTF(2, 3);
extern void dmxLogOutputWarning(DMXScreenInfo * dmxScreen, const char *format,
- ...);
-extern void dmxLogInput(DMXInputInfo * dmxInput, const char *format, ...);
-extern void dmxLogInputCont(DMXInputInfo * dmxInput, const char *format, ...);
+ ...) _X_ATTRIBUTE_PRINTF(2, 3);
+extern void dmxLogInput(DMXInputInfo * dmxInput, const char *format,
+ ...) _X_ATTRIBUTE_PRINTF(2, 3);
+extern void dmxLogInputCont(DMXInputInfo * dmxInput, const char *format,
+ ...) _X_ATTRIBUTE_PRINTF(2, 3);
extern void dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv);
extern void dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi,
int defaultVisual);
diff --git a/xorg-server/include/opaque.h b/xorg-server/include/opaque.h
index 9ca408ae1..b76ab6e6b 100644
--- a/xorg-server/include/opaque.h
+++ b/xorg-server/include/opaque.h
@@ -50,6 +50,7 @@ extern _X_EXPORT int ScreenSaverAllowExposures;
extern _X_EXPORT int defaultScreenSaverBlanking;
extern _X_EXPORT int defaultScreenSaverAllowExposures;
extern _X_EXPORT char *display;
+extern _X_EXPORT int displayfd;
extern _X_EXPORT int defaultBackingStore;
extern _X_EXPORT Bool disableBackingStore;
diff --git a/xorg-server/man/Xserver.man b/xorg-server/man/Xserver.man
index 0cd9b941c..8d243d6b7 100644
--- a/xorg-server/man/Xserver.man
+++ b/xorg-server/man/Xserver.man
@@ -127,6 +127,13 @@ Not obeyed by all servers.
.B \-core
causes the server to generate a core dump on fatal errors.
.TP 8
+.B \-displayfd \fIfd\fP
+specifies a file descriptor in the launching process. Rather than specify
+a display number, the X server will attempt to listen on successively higher
+display numbers, and upon finding a free one, will write the port number back
+on this file descriptor as a newline-terminated string. The \-pn option is
+ignored when using \-displayfd.
+.TP 8
.B \-deferglyphs \fIwhichfonts\fP
specifies the types of fonts for which the server should attempt to use
deferred glyph loading. \fIwhichfonts\fP can be all (all fonts),
diff --git a/xorg-server/os/WaitFor.c b/xorg-server/os/WaitFor.c
index 6c8ede29d..95762ef18 100644
--- a/xorg-server/os/WaitFor.c
+++ b/xorg-server/os/WaitFor.c
@@ -388,6 +388,7 @@ CheckAllTimers(void)
OsTimerPtr timer;
CARD32 now;
+ OsBlockSignals();
start:
now = GetTimeInMillis();
@@ -397,6 +398,7 @@ CheckAllTimers(void)
goto start;
}
}
+ OsReleaseSignals();
}
static void
@@ -404,11 +406,13 @@ DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev)
{
CARD32 newTime;
+ OsBlockSignals();
*prev = timer->next;
timer->next = NULL;
newTime = (*timer->callback) (timer, now, timer->arg);
if (newTime)
TimerSet(timer, 0, newTime, timer->callback, timer->arg);
+ OsReleaseSignals();
}
OsTimerPtr
@@ -424,6 +428,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
return NULL;
}
else {
+ OsBlockSignals();
for (prev = &timers; *prev; prev = &(*prev)->next) {
if (*prev == timer) {
*prev = timer->next;
@@ -432,6 +437,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
break;
}
}
+ OsReleaseSignals();
}
if (!millis)
return timer;
@@ -451,26 +457,32 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
if (!millis)
return timer;
}
+ OsBlockSignals();
for (prev = &timers;
*prev && (int) ((*prev)->expires - millis) <= 0;
prev = &(*prev)->next);
timer->next = *prev;
*prev = timer;
+ OsReleaseSignals();
return timer;
}
Bool
TimerForce(OsTimerPtr timer)
{
+ int rc = FALSE;
OsTimerPtr *prev;
+ OsBlockSignals();
for (prev = &timers; *prev; prev = &(*prev)->next) {
if (*prev == timer) {
DoTimer(timer, GetTimeInMillis(), prev);
- return TRUE;
+ rc = TRUE;
+ break;
}
}
- return FALSE;
+ OsReleaseSignals();
+ return rc;
}
void
@@ -480,12 +492,14 @@ TimerCancel(OsTimerPtr timer)
if (!timer)
return;
+ OsBlockSignals();
for (prev = &timers; *prev; prev = &(*prev)->next) {
if (*prev == timer) {
*prev = timer->next;
break;
}
}
+ OsReleaseSignals();
}
void
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index 53a6ca005..1685292ce 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -152,6 +152,7 @@ static Pid_t ParentProcess;
#endif
Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or
equivalent) will send SIGCONT back. */
+static char dynamic_display[7]; /* display name */
Bool PartialNetwork; /* continue even if unable to bind all addrs */
static Bool debug_conns = FALSE;
@@ -376,6 +377,10 @@ void
NotifyParentProcess(void)
{
#if !defined(WIN32)
+ if (dynamic_display[0]) {
+ write(displayfd, dynamic_display, strlen(dynamic_display));
+ close(displayfd);
+ }
if (RunFromSmartParent) {
if (ParentProcess > 1) {
kill(ParentProcess, SIGUSR1);
@@ -386,6 +391,18 @@ NotifyParentProcess(void)
#endif
}
+static Bool
+TryCreateSocket(int num, int *partial)
+{
+ char port[20];
+
+ snprintf(port, sizeof(port), "%d", num);
+
+ return (_XSERVTransMakeAllCOTSServerListeners(port, partial,
+ &ListenTransCount,
+ &ListenTransConns) >= 0);
+}
+
/*****************
* CreateWellKnownSockets
* At initialization, create the sockets to listen on for new clients.
@@ -396,7 +413,6 @@ CreateWellKnownSockets(void)
{
int i;
int partial;
- char port[20];
FD_ZERO(&AllSockets);
FD_ZERO(&AllClients);
@@ -412,31 +428,44 @@ CreateWellKnownSockets(void)
FD_ZERO(&WellKnownConnections);
- snprintf(port, sizeof(port), "%d", atoi(display));
-
- if ((_XSERVTransMakeAllCOTSServerListeners(port, &partial,
- &ListenTransCount,
- &ListenTransConns) >= 0) &&
- (ListenTransCount >= 1)) {
- if (!PartialNetwork && partial) {
- FatalError("Failed to establish all listening sockets");
+ /* display is initialized to "0" by main(). It is then set to the display
+ * number if specified on the command line, or to NULL when the -displayfd
+ * option is used. */
+ if (display) {
+ if (TryCreateSocket(atoi(display), &partial) &&
+ ListenTransCount >= 1)
+ if (!PartialNetwork && partial)
+ FatalError ("Failed to establish all listening sockets");
+ }
+ else { /* -displayfd */
+ Bool found = 0;
+ for (i = 0; i < 65535 - X_TCP_PORT; i++) {
+ if (TryCreateSocket(i, &partial) && !partial) {
+ found = 1;
+ break;
+ }
+ else
+ CloseWellKnownConnections();
}
- else {
- ListenTransFds = malloc(ListenTransCount * sizeof(int));
+ if (!found)
+ FatalError("Failed to find a socket to listen on");
+ snprintf(dynamic_display, sizeof(dynamic_display), "%d", i);
+ display = dynamic_display;
+ }
- for (i = ListenTransCount; i > 0; i--) {
- int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i-1]);
+ ListenTransFds = malloc(ListenTransCount * sizeof (int));
- ListenTransFds[i-1] = fd;
- FD_SET(fd, &WellKnownConnections);
+ for (i = ListenTransCount; i > 0; i--) {
+ int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i-1]);
- if (!_XSERVTransIsLocal (ListenTransConns[i-1])) {
- int protocol = 0;
- if (!strcmp("inet", ListenTransConns[i-1]->transptr->TransName)) protocol = 4;
- else if (!strcmp("inet6", ListenTransConns[i-1]->transptr->TransName)) protocol = 6;
- DefineSelf (fd, protocol);
- }
- }
+ ListenTransFds[i-1] = fd;
+ FD_SET(fd, &WellKnownConnections);
+
+ if (!_XSERVTransIsLocal (ListenTransConns[i-1])) {
+ int protocol = 0;
+ if (!strcmp("inet", ListenTransConns[i-1]->transptr->TransName)) protocol = 4;
+ else if (!strcmp("inet6", ListenTransConns[i-1]->transptr->TransName)) protocol = 6;
+ DefineSelf (fd, protocol);
}
}
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index dbed76132..47bc7b5c3 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -687,6 +687,15 @@ ProcessCommandLine(int argc, char *argv[])
else
UseMsg();
}
+ else if (strcmp(argv[i], "-displayfd") == 0) {
+ if (++i < argc) {
+ displayfd = atoi(argv[i]);
+ display = NULL;
+ nolock = TRUE;
+ }
+ else
+ UseMsg();
+ }
#ifdef DPMSExtension
else if (strcmp(argv[i], "dpms") == 0)
/* ignored for compatibility */ ;
diff --git a/xorg-server/test/Makefile.am b/xorg-server/test/Makefile.am
index 85823977b..b2a53aa64 100644
--- a/xorg-server/test/Makefile.am
+++ b/xorg-server/test/Makefile.am
@@ -36,7 +36,7 @@ misc_LDADD=$(TEST_LDADD)
fixes_LDADD=$(TEST_LDADD)
xfree86_LDADD=$(TEST_LDADD)
touch_LDADD=$(TEST_LDADD)
-hashtabletest_LDADD=$(TEST_LDADD) ../Xext/hashtable.c
+hashtabletest_LDADD=$(TEST_LDADD) $(top_srcdir)/Xext/hashtable.c
libxservertest_la_LIBADD = $(XSERVER_LIBS)
if XORG
diff --git a/xorg-server/test/xi2/protocol-xiqueryversion.c b/xorg-server/test/xi2/protocol-xiqueryversion.c
index 2552307f2..1347e866c 100644
--- a/xorg-server/test/xi2/protocol-xiqueryversion.c
+++ b/xorg-server/test/xi2/protocol-xiqueryversion.c
@@ -54,6 +54,8 @@ struct test_data {
int minor_client;
int major_server;
int minor_server;
+ int major_cached;
+ int minor_cached;
};
static void
@@ -82,6 +84,24 @@ reply_XIQueryVersion(ClientPtr client, int len, char *data, void *userdata)
assert((sver > cver) ? ver == cver : ver == sver);
}
+static void
+reply_XIQueryVersion_multiple(ClientPtr client, int len, char *data, void *userdata)
+{
+ xXIQueryVersionReply *rep = (xXIQueryVersionReply *) data;
+ struct test_data *versions = (struct test_data *) userdata;
+
+ reply_check_defaults(rep, len, XIQueryVersion);
+ assert(rep->length == 0);
+
+ if (versions->major_cached == -1) {
+ versions->major_cached = rep->major_version;
+ versions->minor_cached = rep->minor_version;
+ }
+
+ assert(versions->major_cached == rep->major_version);
+ assert(versions->minor_cached == rep->minor_version);
+}
+
/**
* Run a single test with server version smaj.smin and client
* version cmaj.cmin. Verify that return code is equal to 'error'.
@@ -173,12 +193,105 @@ test_XIQueryVersion(void)
reply_handler = NULL;
}
+
+static void
+test_XIQueryVersion_multiple(void)
+{
+ xXIQueryVersionReq request;
+ ClientRec client;
+ struct test_data versions;
+ int rc;
+
+ request_init(&request, XIQueryVersion);
+ client = init_client(request.length, &request);
+
+ /* Change the server to support 2.2 */
+ XIVersion.major_version = 2;
+ XIVersion.minor_version = 2;
+
+ reply_handler = reply_XIQueryVersion_multiple;
+ userdata = (void *) &versions;
+
+ /* run 1 */
+ versions.major_cached = -1;
+ versions.minor_cached = -1;
+
+ /* client is lower than server, noncached */
+ request.major_version = 2;
+ request.minor_version = 1;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == Success);
+
+ /* client is higher than server, cached */
+ request.major_version = 2;
+ request.minor_version = 3;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == Success);
+
+ /* client is equal, cached */
+ request.major_version = 2;
+ request.minor_version = 2;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == Success);
+
+ /* client is low than cached */
+ request.major_version = 2;
+ request.minor_version = 0;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == BadValue);
+
+ /* run 2 */
+ client = init_client(request.length, &request);
+ XIVersion.major_version = 2;
+ XIVersion.minor_version = 2;
+ versions.major_cached = -1;
+ versions.minor_cached = -1;
+
+ request.major_version = 2;
+ request.minor_version = 2;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == Success);
+
+ request.major_version = 2;
+ request.minor_version = 3;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == Success);
+
+ request.major_version = 2;
+ request.minor_version = 1;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == BadValue);
+
+ /* run 3 */
+ client = init_client(request.length, &request);
+ XIVersion.major_version = 2;
+ XIVersion.minor_version = 2;
+ versions.major_cached = -1;
+ versions.minor_cached = -1;
+
+ request.major_version = 2;
+ request.minor_version = 3;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == Success);
+
+ request.major_version = 2;
+ request.minor_version = 2;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == Success);
+
+ request.major_version = 2;
+ request.minor_version = 1;
+ rc = ProcXIQueryVersion(&client);
+ assert(rc == BadValue);
+}
+
int
main(int argc, char **argv)
{
init_simple();
test_XIQueryVersion();
+ test_XIQueryVersion_multiple();
return 0;
}
diff --git a/xorg-server/xkeyboard-config/symbols/dk b/xorg-server/xkeyboard-config/symbols/dk
index 1187a99bd..1deea28aa 100644
--- a/xorg-server/xkeyboard-config/symbols/dk
+++ b/xorg-server/xkeyboard-config/symbols/dk
@@ -69,4 +69,5 @@ xkb_symbols "dvorak" {
include "no(dvorak)"
name[Group1]= "Danish (Dvorak)";
+ key <AD12> { [ asciitilde, asciicircum, dead_diaeresis, dead_tilde ] };
};
diff --git a/xorg-server/xkeyboard-config/symbols/latin b/xorg-server/xkeyboard-config/symbols/latin
index 77b99d46c..424768ead 100644
--- a/xorg-server/xkeyboard-config/symbols/latin
+++ b/xorg-server/xkeyboard-config/symbols/latin
@@ -35,7 +35,7 @@ xkb_symbols "basic" {
key <AC04> { [ f, F, dstroke, ordfeminine ] };
key <AC05> { [ g, G, eng, ENG ] };
key <AC06> { [ h, H, hstroke, Hstroke ] };
- key <AC07> { [ j, J, j, J ] };
+ key <AC07> { [ j, J, dead_hook, dead_horn ] };
key <AC08> { [ k, K, kra, ampersand ] };
key <AC09> { [ l, L, lstroke, Lstroke ] };
key <AC10> { [ semicolon, colon, dead_acute, dead_doubleacute ] };
diff --git a/xorg-server/xkeyboard-config/symbols/me b/xorg-server/xkeyboard-config/symbols/me
index dd81567c2..54d63e130 100644
--- a/xorg-server/xkeyboard-config/symbols/me
+++ b/xorg-server/xkeyboard-config/symbols/me
@@ -7,8 +7,10 @@ default partial alphanumeric_keys
xkb_symbols "basic" {
include "rs(latin)"
name[Group1]= "Montenegrin";
-};
+ key <AD06> { [ any, any, zacute, Zacute ] }; // z
+ key <AC02> { [ any, any, sacute, Sacute ] }; // s
+};
partial alphanumeric_keys
xkb_symbols "cyrillic" {
@@ -16,7 +18,6 @@ xkb_symbols "cyrillic" {
name[Group1]= "Montenegrin (Cyrillic)";
};
-
partial alphanumeric_keys
xkb_symbols "cyrillicyz" {
include "rs(yz)"
@@ -27,18 +28,27 @@ partial alphanumeric_keys
xkb_symbols "latinunicode" {
include "rs(latinunicode)"
name[Group1]= "Montenegrin (Latin Unicode)";
+
+ key <AD06> { [ any, any, zacute, Zacute ] }; // z
+ key <AC02> { [ any, any, sacute, Sacute ] }; // s
};
partial alphanumeric_keys
xkb_symbols "latinyz" {
include "rs(latinyz)"
name[Group1]= "Montenegrin (Latin qwerty)";
+
+ key <AB02> { [ any, any, zacute, Zacute ] }; // z
+ key <AC02> { [ any, any, sacute, Sacute ] }; // s
};
partial alphanumeric_keys
xkb_symbols "latinunicodeyz" {
include "rs(latinunicodeyz)"
name[Group1]= "Montenegrin (Latin Unicode qwerty)";
+
+ key <AB02> { [ any, any, zacute, Zacute ] }; // z
+ key <AC02> { [ any, any, sacute, Sacute ] }; // s
};
xkb_symbols "cyrillicalternatequotes" {
@@ -49,4 +59,8 @@ xkb_symbols "cyrillicalternatequotes" {
xkb_symbols "latinalternatequotes" {
include "rs(latinalternatequotes)"
name[Group1]= "Montenegrin (Latin with guillemets)";
+
+ key <AD06> { [ any, any, zacute, Zacute ] }; // z
+ key <AC02> { [ any, any, sacute, Sacute ] }; // s
+ key <LSGT> { [ any, any, guillemotleft, guillemotright ] }; // <
};