From 1cc98f5a48924d750fbef7ea6b05a1ba49c28589 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 5 Nov 2012 07:36:16 +0100 Subject: xserver mesa xkbcomp git update 5 nov 2012 xserver: a194630f7f7b287cb4ea4a459df0745f4c0d4c1a mesa: ccbfe3dde94cd50a4e6468cfeabf95c79c9d8072 xkbcomp: a68c5b7b29eb1433b1be73b50c4248e10eab8e64 --- xorg-server/Xi/chgdctl.c | 3 +- xorg-server/Xi/exevents.c | 5 ++ xorg-server/Xi/xiproperty.c | 3 + xorg-server/configure.ac | 4 +- xorg-server/dix/getevents.c | 5 +- xorg-server/dix/touch.c | 4 +- xorg-server/doc/c-extensions | 129 +++++++++++++++-------------- xorg-server/hw/xfree86/common/xf86Events.c | 2 +- xorg-server/hw/xwin/winprefs.c | 2 + xorg-server/include/xserver-properties.h | 3 + xorg-server/os/utils.c | 20 +++++ xorg-server/xkb/xkbAccessX.c | 2 +- 12 files changed, 112 insertions(+), 70 deletions(-) (limited to 'xorg-server') diff --git a/xorg-server/Xi/chgdctl.c b/xorg-server/Xi/chgdctl.c index 9fe69a5ad..7daf58461 100644 --- a/xorg-server/Xi/chgdctl.c +++ b/xorg-server/Xi/chgdctl.c @@ -126,7 +126,8 @@ ProcXChangeDeviceControl(ClientPtr client) .repType = X_Reply, .RepType = X_ChangeDeviceControl, .sequenceNumber = client->sequence, - .length = 0 + .length = 0, + .status = Success, }; switch (stuff->control) { diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 6ed499142..4cbeb3796 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1862,6 +1862,11 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, goto out; } + if (listener->state == LISTENER_AWAITING_BEGIN) { + listener->state = LISTENER_HAS_END; + goto out; + } + /* Event in response to reject */ if (ev->device_event.flags & TOUCH_REJECT) { if (listener->state != LISTENER_HAS_END) diff --git a/xorg-server/Xi/xiproperty.c b/xorg-server/Xi/xiproperty.c index 43351bccc..796ba0948 100644 --- a/xorg-server/Xi/xiproperty.c +++ b/xorg-server/Xi/xiproperty.c @@ -105,6 +105,9 @@ static struct dev_properties { {0, AXIS_LABEL_PROP_ABS_MT_BLOB_ID}, {0, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID}, {0, AXIS_LABEL_PROP_ABS_MT_PRESSURE}, + {0, AXIS_LABEL_PROP_ABS_MT_DISTANCE}, + {0, AXIS_LABEL_PROP_ABS_MT_TOOL_X}, + {0, AXIS_LABEL_PROP_ABS_MT_TOOL_Y}, {0, AXIS_LABEL_PROP_ABS_MISC}, {0, BTN_LABEL_PROP}, {0, BTN_LABEL_PROP_BTN_UNKNOWN}, diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac index b6ed92cb3..86153ec81 100644 --- a/xorg-server/configure.ac +++ b/xorg-server/configure.ac @@ -420,7 +420,7 @@ case $host_os in darwin*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;; - cygwin*) + cygwin*|mingw*) CFLAGS="$CFLAGS -DFD_SETSIZE=256" ;; esac @@ -1904,7 +1904,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=-lws2_32 + XWIN_SYS_LIBS="-lpthread -lws2_32" ;; esac diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c index 71d83c4ba..8b4379d1c 100644 --- a/xorg-server/dix/getevents.c +++ b/xorg-server/dix/getevents.c @@ -1400,8 +1400,9 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, coordinates were. */ if (flags & POINTER_SCREEN) { - screenx = sx; - screeny = sy; + scr = miPointerGetScreen(pDev); + screenx = sx + scr->x; + screeny = sy + scr->y; } scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative, diff --git a/xorg-server/dix/touch.c b/xorg-server/dix/touch.c index e64a6262c..5f77be575 100644 --- a/xorg-server/dix/touch.c +++ b/xorg-server/dix/touch.c @@ -572,8 +572,8 @@ TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, return FALSE; /* Mark which grabs/event selections we're delivering to: max one grab per - * window plus the bottom-most event selection. */ - ti->listeners = calloc(sprite->spriteTraceGood + 1, sizeof(*ti->listeners)); + * window plus the bottom-most event selection, plus any active grab. */ + ti->listeners = calloc(sprite->spriteTraceGood + 2, sizeof(*ti->listeners)); if (!ti->listeners) { sprite->spriteTraceGood = 0; return FALSE; diff --git a/xorg-server/doc/c-extensions b/xorg-server/doc/c-extensions index 984022333..4a9006150 100644 --- a/xorg-server/doc/c-extensions +++ b/xorg-server/doc/c-extensions @@ -1,61 +1,68 @@ -First of all: C89 or better. If you don't have that, port gcc first. - -Use of C language extensions throughout the X server tree ---------------------------------------------------------- - -Optional extensions: -The server will still build if your toolchain does not support these -extensions, although the results may not be optimal. - - * _X_SENTINEL(x): member x of the passed structure must be NULL, e.g.: - void parseOptions(Option *options _X_SENTINEL(0)); - parseOptions("foo", "bar", NULL); /* this is OK */ - parseOptions("foo", "bar", "baz"); /* this is not */ - This definition comes from Xfuncproto.h in the core - protocol headers. - * _X_ATTRIBUTE_PRINTF(x, y): This function has printf-like semantics; - check the format string when built with - -Wformat (gcc) or similar. - * _X_EXPORT: this function should appear in symbol tables. - * _X_HIDDEN: this function should not appear in the _dynamic_ symbol - table. - * _X_INTERNAL: like _X_HIDDEN, but attempt to ensure that this function - is never called from another module. - * _X_INLINE: inline this functon if possible (generally obeyed unless - disabling optimisations). - * _X_DEPRECATED: warn on use of this function. - -Mandatory extensions: -The server will not build if your toolchain does not support these extensions. - - * named initialisers: explicitly initialising structure members, e.g.: - struct foo bar = { .baz = quux, .brian = "dog" }; - * variadic macros: macros with a variable number of arguments, e.g.: - #define DebugF(x, ...) /**/ - * interleaved code and declarations: { foo = TRUE; int bar; do_stuff(); } - - -Use of OS and library facilities throughout the X server tree -------------------------------------------------------------- - -Non-OS-dependent code can assume facilities at least as good as -the non-OS-facility parts of POSIX-1.2001. Ideally this would -be C99, but even gcc+glibc doesn't implement that yet. - -Unix-like systems are assumed to be at least as good as UNIX03. - -Linux systems must be at least 2.4 or later. As a practical matter -though, 2.4 kernels never receive any testing. Use 2.6 already. - -TODO: Solaris. - -TODO: *BSD. - -Code that needs to be portable to Windows should be careful to, -well, be portable. Note that there are two Windows ports, cygwin and -mingw. Cygwin is more or less like Linux, but mingw is a bit more -restrictive. TODO: document which versions of Windows we actually care -about. - -OSX support is generally limited to the most recent version. Currently -that means 10.5. +First of all: C89 or better. If you don't have that, port gcc first. + +Use of C language extensions throughout the X server tree +--------------------------------------------------------- + +Optional extensions: +The server will still build if your toolchain does not support these +extensions, although the results may not be optimal. + + * _X_SENTINEL(x): member x of the passed structure must be NULL, e.g.: + void parseOptions(Option *options _X_SENTINEL(0)); + parseOptions("foo", "bar", NULL); /* this is OK */ + parseOptions("foo", "bar", "baz"); /* this is not */ + This definition comes from Xfuncproto.h in the core + protocol headers. + * _X_ATTRIBUTE_PRINTF(x, y): This function has printf-like semantics; + check the format string when built with + -Wformat (gcc) or similar. + * _X_EXPORT: this function should appear in symbol tables. + * _X_HIDDEN: this function should not appear in the _dynamic_ symbol + table. + * _X_INTERNAL: like _X_HIDDEN, but attempt to ensure that this function + is never called from another module. + * _X_INLINE: inline this functon if possible (generally obeyed unless + disabling optimisations). + * _X_DEPRECATED: warn on use of this function. + +Mandatory extensions: +The server will not build if your toolchain does not support these extensions. + + * named initialisers: explicitly initialising structure members, e.g.: + struct foo bar = { .baz = quux, .brian = "dog" }; + * variadic macros: macros with a variable number of arguments, e.g.: + #define DebugF(x, ...) /**/ + * interleaved code and declarations: { foo = TRUE; int bar; do_stuff(); } + + +Use of library facilities throughout the X server tree +------------------------------------------------------------- + +Non-OS-dependent code can assume facilities at least as good as +the non-OS-facility parts of POSIX-1.2001. Ideally this would +be C99, but even gcc+glibc doesn't implement that yet. + +Unix-like systems are assumed to be at least as good as UNIX03. + +Note that there are two Windows ports, Cygwin and MinGW: +- Cygwin is more or less like Linux. +- MinGW is more restrictive. Windows does not provide the required +POSIX facilities, so some non-OS-dependent code is stubbed out or +has an alternate implementation if WIN32 is defined. Code that +needs to be portable to Windows should be careful to, well, be portable. + + +Required OS facilities +------------------------------------------------------------- + +Linux systems must be at least 2.4 or later. As a practical matter +though, 2.4 kernels never receive any testing. Use 2.6 already. + +TODO: Solaris. + +TODO: *BSD. + +Windows-dependent code assumes at least NT 5.1. + +OSX support is generally limited to the most recent version. Currently +that means 10.5. diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c index 3ad34b543..9dabf103f 100644 --- a/xorg-server/hw/xfree86/common/xf86Events.c +++ b/xorg-server/hw/xfree86/common/xf86Events.c @@ -376,7 +376,7 @@ static void xf86ReleaseKeys(DeviceIntPtr pDev) { KeyClassPtr keyc; - int i, sigstate; + int i; if (!pDev || !pDev->key) return; diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c index dbc5b5228..6cbd7ad80 100644 --- a/xorg-server/hw/xwin/winprefs.c +++ b/xorg-server/hw/xwin/winprefs.c @@ -645,6 +645,7 @@ winPrefsLoadPreferences(char *path) if (path) prefFile = fopen(path, "r"); +#ifdef __CYGWIN__ else { char defaultPrefs[] = "MENU rmenu {\n" @@ -656,6 +657,7 @@ winPrefsLoadPreferences(char *path) path = "built-in default"; prefFile = fmemopen(defaultPrefs, strlen(defaultPrefs), "r"); } +#endif if (!prefFile) { ErrorF("LoadPreferences: %s not found\n", path); diff --git a/xorg-server/include/xserver-properties.h b/xorg-server/include/xserver-properties.h index 85f2ce5c4..bf48fabe5 100644 --- a/xorg-server/include/xserver-properties.h +++ b/xorg-server/include/xserver-properties.h @@ -118,6 +118,9 @@ #define AXIS_LABEL_PROP_ABS_MT_BLOB_ID "Abs MT Blob ID" #define AXIS_LABEL_PROP_ABS_MT_TRACKING_ID "Abs MT Tracking ID" #define AXIS_LABEL_PROP_ABS_MT_PRESSURE "Abs MT Pressure" +#define AXIS_LABEL_PROP_ABS_MT_DISTANCE "Abs MT Distance" +#define AXIS_LABEL_PROP_ABS_MT_TOOL_X "Abs MT Tool X" +#define AXIS_LABEL_PROP_ABS_MT_TOOL_Y "Abs MT Tool Y" #define AXIS_LABEL_PROP_ABS_MISC "Abs Misc" /* Button names */ diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index 04bcbc61f..3c520add5 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -235,6 +235,19 @@ OsSignal(int sig, OsSigHandlerPtr handler) #define LOCK_PREFIX "/.X" #define LOCK_SUFFIX "-lock" +#if !defined(WIN32) || defined(__CYGWIN__) +#define LOCK_SERVER +#endif + +#ifndef LOCK_SERVER +void +LockServer(void) +{} + +void +UnlockServer(void) +{} +#else /* LOCK_SERVER */ static Bool StillLocking = FALSE; static char LockFile[PATH_MAX]; static Bool nolock = FALSE; @@ -382,6 +395,7 @@ UnlockServer(void) (void) unlink(LockFile); } } +#endif /* LOCK_SERVER */ /* Force connections to close on SIGHUP from init */ @@ -503,7 +517,9 @@ UseMsg(void) #ifdef RLIMIT_STACK ErrorF("-ls int limit stack space to N Kb\n"); #endif +#ifdef LOCK_SERVER ErrorF("-nolock disable the locking mechanism\n"); +#endif ErrorF("-nolisten string don't listen on protocol\n"); ErrorF("-noreset don't reset after last client exists\n"); ErrorF("-background [none] create root window with no background\n"); @@ -664,7 +680,9 @@ ProcessCommandLine(int argc, char *argv[]) if (++i < argc) { displayfd = atoi(argv[i]); display = NULL; +#ifdef LOCK_SERVER nolock = TRUE; +#endif } else UseMsg(); @@ -744,6 +762,7 @@ ProcessCommandLine(int argc, char *argv[]) UseMsg(); } #endif +#ifdef LOCK_SERVER else if (strcmp(argv[i], "-nolock") == 0) { #if !defined(WIN32) && !defined(__CYGWIN__) if (getuid() != 0) @@ -753,6 +772,7 @@ ProcessCommandLine(int argc, char *argv[]) #endif nolock = TRUE; } +#endif else if (strcmp(argv[i], "-nolisten") == 0) { if (++i < argc) { if (_XSERVTransNoListen(argv[i])) diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c index 082c0db57..c1af32eb9 100644 --- a/xorg-server/xkb/xkbAccessX.c +++ b/xorg-server/xkb/xkbAccessX.c @@ -709,7 +709,7 @@ ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse) xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); DeviceEvent *event = &ev->device_event; - dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); + dev = (IsMaster(mouse) || IsFloating(mouse)) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); if (dev && dev->key) { xkbi = dev->key->xkbInfo; -- cgit v1.2.3