aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-09 16:07:11 +0200
committermarha <marha@users.sourceforge.net>2012-05-09 16:07:11 +0200
commit58780b4306bd1254c6c0e65d255630d5c546005f (patch)
tree71c3b3842ee282b0228246840f5006c369684ab7 /xorg-server
parent38e785557684536d03fff096d56d5db61cc42e8a (diff)
parent8a448108ec0bc3a0a488b2234e0d12aee503c67c (diff)
downloadvcxsrv-58780b4306bd1254c6c0e65d255630d5c546005f.tar.gz
vcxsrv-58780b4306bd1254c6c0e65d255630d5c546005f.tar.bz2
vcxsrv-58780b4306bd1254c6c0e65d255630d5c546005f.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xi/xiquerypointer.c25
-rw-r--r--xorg-server/configure.ac30
-rw-r--r--xorg-server/hw/xfree86/Makefile.am4
-rw-r--r--xorg-server/hw/xwin/glx/Makefile.am4
-rw-r--r--xorg-server/include/dix-config.h.in3
-rw-r--r--xorg-server/os/xsha1.c42
-rw-r--r--xorg-server/xkeyboard-config/rules/base.xml.in6
-rw-r--r--xorg-server/xkeyboard-config/symbols/de15
-rw-r--r--xorg-server/xkeyboard-config/symbols/it4
9 files changed, 114 insertions, 19 deletions
diff --git a/xorg-server/Xi/xiquerypointer.c b/xorg-server/Xi/xiquerypointer.c
index a2e7442e0..169436e14 100644
--- a/xorg-server/Xi/xiquerypointer.c
+++ b/xorg-server/Xi/xiquerypointer.c
@@ -79,10 +79,21 @@ ProcXIQueryPointer(ClientPtr client)
XkbStatePtr state;
char *buttons = NULL;
int buttons_size = 0; /* size of buttons array */
+ XIClientPtr xi_client;
+ Bool have_xi22 = FALSE;
REQUEST(xXIQueryPointerReq);
REQUEST_SIZE_MATCH(xXIQueryPointerReq);
+ /* Check if client is compliant with XInput 2.2 or later. Earlier clients
+ * do not know about touches, so we must report emulated button presses. 2.2
+ * and later clients are aware of touches, so we don't include emulated
+ * button presses in the reply. */
+ xi_client = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
+ if (version_compare(xi_client->major_version,
+ xi_client->minor_version, 2, 2) >= 0)
+ have_xi22 = TRUE;
+
rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixReadAccess);
if (rc != Success) {
client->errorValue = stuff->deviceid;
@@ -132,7 +143,7 @@ ProcXIQueryPointer(ClientPtr client)
}
if (pDev->button) {
- int i, down;
+ int i;
rep.buttons_len =
bytes_to_int32(bits_to_bytes(pDev->button->numButtons));
@@ -142,14 +153,12 @@ ProcXIQueryPointer(ClientPtr client)
if (!buttons)
return BadAlloc;
- down = pDev->button->buttonsDown;
+ for (i = 1; i < pDev->button->numButtons; i++)
+ if (BitIsOn(pDev->button->down, i))
+ SetBit(buttons, pDev->button->map[i]);
- for (i = 0; i < pDev->button->numButtons && down; i++) {
- if (BitIsOn(pDev->button->down, i)) {
- SetBit(buttons, i);
- down--;
- }
- }
+ if (!have_xi22 && pDev->touch && pDev->touch->buttonsDown > 0)
+ SetBit(buttons, pDev->button->map[1]);
}
else
rep.buttons_len = 0;
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index 4afac8268..97ceab1b8 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -271,10 +271,11 @@ AC_CACHE_CHECK([for SYSV IPC],
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
+#include <sys/stat.h>
],[
{
int id;
- id = shmget(IPC_PRIVATE, 512, SHM_W | SHM_R);
+ id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR);
if (id < 0) return -1;
return shmctl(id, IPC_RMID, 0);
}],
@@ -592,7 +593,7 @@ AC_ARG_WITH(khronos-spec-dir, AS_HELP_STRING([--with-khronos-spec-dir=PATH], [Pa
dnl Extensions.
AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes])
AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes])
-AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-mitshm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes])
+AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-mitshm], [Build SHM extension (default: auto)]), [MITSHM=$enableval], [MITSHM=auto])
AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes])
AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes])
AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
@@ -656,6 +657,7 @@ AC_MSG_CHECKING([to see if we can install the Xorg server as root])
if test "x$SETUID" = "xauto" ; then
case $host_os in
cygwin*) SETUID="no" ;;
+ mingw*) SETUID="no" ;;
darwin*) SETUID="no" ;;
*)
case $host_cpu in
@@ -698,7 +700,7 @@ AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes])
dnl DDX Detection... Yes, it's ugly to have it here... but we need to
dnl handle this early on so that we don't require unsupported extensions
case $host_os in
- cygwin*)
+ cygwin* | mingw*)
CONFIG_DBUS_API=no
CONFIG_HAL=no
CONFIG_UDEV=no
@@ -1000,6 +1002,9 @@ if test "x$COMPOSITE" = xyes; then
COMPOSITE_INC='-I$(top_srcdir)/composite'
fi
+if test "x$MITSHM" = xauto; then
+ MITSHM="$ac_cv_sysv_ipc"
+fi
AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes])
if test "x$MITSHM" = xyes; then
AC_DEFINE(MITSHM, 1, [Support MIT-SHM extension])
@@ -1350,7 +1355,7 @@ CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
# SHA1 hashing
AC_ARG_WITH([sha1],
- [AS_HELP_STRING([--with-sha1=libc|libmd|libgcrypt|libcrypto|libsha1|CommonCrypto],
+ [AS_HELP_STRING([--with-sha1=libc|libmd|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
[choose SHA1 implementation])])
AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes])
if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
@@ -1376,6 +1381,19 @@ if test "x$with_sha1" = xCommonCrypto; then
[Use CommonCrypto SHA1 functions])
SHA1_LIBS=""
fi
+dnl stdcall functions cannot be tested with AC_CHECK_LIB
+AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include <windows.h>])
+if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then
+ with_sha1=CryptoAPI
+fi
+if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then
+ AC_MSG_ERROR([CryptoAPI requested but not found])
+fi
+if test "x$with_sha1" = xCryptoAPI; then
+ AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1],
+ [Use CryptoAPI SHA1 functions])
+ SHA1_LIBS=""
+fi
AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes])
if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
with_sha1=libmd
@@ -1547,6 +1565,7 @@ if test "x$XORG" = xauto; then
XORG="yes"
case $host_os in
cygwin*) XORG="no" ;;
+ mingw*) XORG="no" ;;
darwin*) XORG="no" ;;
esac
fi
@@ -1857,7 +1876,7 @@ if test "x$XWIN" = xyes; then
XWIN_SERVER_NAME=Xming
AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location])
AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets])
- XWIN_SYS_LIBS=-lwinsock2
+ XWIN_SYS_LIBS=-lws2_32
;;
esac
XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
@@ -1948,6 +1967,7 @@ if test "x$DMX" = xauto; then
DMX="$have_dmx"
case $host_os in
cygwin*) DMX="no" ;;
+ mingw*) DMX="no" ;;
darwin*) DMX="no" ;;
esac
fi
diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am
index d61c6401b..e50cb88c2 100644
--- a/xorg-server/hw/xfree86/Makefile.am
+++ b/xorg-server/hw/xfree86/Makefile.am
@@ -106,13 +106,13 @@ xorg.conf.example: xorgconf.cpp
$(AM_V_GEN)$(SED) $(CONF_SUBSTS) < $(srcdir)/xorgconf.cpp > $@
relink:
- $(AM_V_at)rm -f Xorg && $(MAKE) Xorg
+ $(AM_V_at)rm -f Xorg$(EXEEXT) && $(MAKE) Xorg$(EXEEXT)
CLEANFILES = sdksyms.c sdksyms.dep
EXTRA_DIST += sdksyms.sh
sdksyms.dep sdksyms.c: sdksyms.sh
- CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(INCLUDES)
+ $(AM_V_GEN)CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(INCLUDES)
SDKSYMS_DEP = sdksyms.dep
include $(SDKSYMS_DEP)
diff --git a/xorg-server/hw/xwin/glx/Makefile.am b/xorg-server/hw/xwin/glx/Makefile.am
index 6b840bacb..7222a9f21 100644
--- a/xorg-server/hw/xwin/glx/Makefile.am
+++ b/xorg-server/hw/xwin/glx/Makefile.am
@@ -32,10 +32,10 @@ AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
if XWIN_GLX_WINDOWS
generated_gl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.spec $(KHRONOS_SPEC_DIR)/gl.tm
- $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/gl.spec --typemap=$(KHRONOS_SPEC_DIR)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c
+ $(AM_V_GEN)$(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/gl.spec --typemap=$(KHRONOS_SPEC_DIR)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c
generated_wgl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wglext.spec $(KHRONOS_SPEC_DIR)/wgl.tm
- $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/wglext.spec --typemap=$(KHRONOS_SPEC_DIR)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c
+ $(AM_V_GEN)$(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/wglext.spec --typemap=$(KHRONOS_SPEC_DIR)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c
endif
BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c
diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in
index 3fb641367..3c9bbafeb 100644
--- a/xorg-server/include/dix-config.h.in
+++ b/xorg-server/include/dix-config.h.in
@@ -148,6 +148,9 @@
/* Define to use CommonCrypto SHA1 functions */
#undef HAVE_SHA1_IN_COMMONCRYPTO
+/* Define to use CryptoAPI SHA1 functions */
+#undef HAVE_SHA1_IN_CRYPTOAPI
+
/* Define to use libmd SHA1 functions */
#undef HAVE_SHA1_IN_LIBMD
diff --git a/xorg-server/os/xsha1.c b/xorg-server/os/xsha1.c
index dccce74b6..fa66c7a06 100644
--- a/xorg-server/os/xsha1.c
+++ b/xorg-server/os/xsha1.c
@@ -74,6 +74,48 @@ x_sha1_final(void *ctx, unsigned char result[20])
return 1;
}
+#elif defined(HAVE_SHA1_IN_CRYPTOAPI) /* Use CryptoAPI for SHA1 */
+
+#define WIN32_LEAN_AND_MEAN
+#include <X11/Xwindows.h>
+#include <wincrypt.h>
+
+static HCRYPTPROV hProv;
+
+void *
+x_sha1_init(void)
+{
+ HCRYPTHASH *ctx = malloc(sizeof(*ctx));
+
+ if (!ctx)
+ return NULL;
+ CryptAcquireContext(&hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
+ CryptCreateHash(hProv, CALG_SHA1, 0, 0, ctx);
+ return ctx;
+}
+
+int
+x_sha1_update(void *ctx, void *data, int size)
+{
+ HCRYPTHASH *hHash = ctx;
+
+ CryptHashData(*hHash, data, size, 0);
+ return 1;
+}
+
+int
+x_sha1_final(void *ctx, unsigned char result[20])
+{
+ HCRYPTHASH *hHash = ctx;
+ DWORD len = 20;
+
+ CryptGetHashParam(*hHash, HP_HASHVAL, result, &len, 0);
+ CryptDestroyHash(*hHash);
+ CryptReleaseContext(hProv, 0);
+ free(ctx);
+ return 1;
+}
+
#elif defined(HAVE_SHA1_IN_LIBGCRYPT) /* Use libgcrypt for SHA1 */
#include <gcrypt.h>
diff --git a/xorg-server/xkeyboard-config/rules/base.xml.in b/xorg-server/xkeyboard-config/rules/base.xml.in
index d9883f1ae..e0c1b4e58 100644
--- a/xorg-server/xkeyboard-config/rules/base.xml.in
+++ b/xorg-server/xkeyboard-config/rules/base.xml.in
@@ -3148,6 +3148,12 @@
</variant>
<variant>
<configItem>
+ <name>qwerty</name>
+ <_description>German (qwerty)</_description>
+ </configItem>
+ </variant>
+ <variant>
+ <configItem>
<name>ru</name>
<_description>Russian (Germany, phonetic)</_description>
<languageList>
diff --git a/xorg-server/xkeyboard-config/symbols/de b/xorg-server/xkeyboard-config/symbols/de
index 4a04cadae..5e412f6a0 100644
--- a/xorg-server/xkeyboard-config/symbols/de
+++ b/xorg-server/xkeyboard-config/symbols/de
@@ -484,6 +484,21 @@ xkb_symbols "dsb_qwertz"
key <AD09> { [ o, O, oacute, Oacute ] };
};
+partial alphanumeric_keys
+xkb_symbols "qwerty" {
+
+ // This layout should work exactly as a de with the exception
+ // of 'Z' and 'Y' keys, which are in the qwerty style (ie. swapped).
+ // 2008 by Matej Košík <kosik@fiit.stuba.sk>
+
+ include "de(basic)"
+
+ name[Group1] = "German (qwerty)";
+
+ key <AB01> { [ z, Z, leftarrow, yen ] };
+ key <AD06> { [ y, Y, guillemotleft, less ] };
+};
+
// layout for Russian letters on an german keyboard
// based on US-RU layout by Ivan Popov <pin@konvalo.org> 2005-07-17
// adopted for german layout by Alexey Fisher <bug-track@fisher-privat.net> 2010-08-19
diff --git a/xorg-server/xkeyboard-config/symbols/it b/xorg-server/xkeyboard-config/symbols/it
index 90fb7f5c9..1d26a044b 100644
--- a/xorg-server/xkeyboard-config/symbols/it
+++ b/xorg-server/xkeyboard-config/symbols/it
@@ -175,9 +175,9 @@ xkb_symbols "olpc" {
partial alphanumeric_keys modifier_keys
xkb_symbols "us" {
- name[Group1]= "Italian (US keyboard with Italian letters)";
-
include "us(euro)"
+
+ name[Group1]= "Italian (US keyboard with Italian letters)";
// Alphanumeric section