[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'upstream-unstable'



Rebased ref, commits from common ancestor:
commit d4bb09823fa9a7cd78366e7a3cf4319e1f69f1b5
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon May 30 11:37:48 2011 +0200

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index f4da03e..607e7f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-xorg-server (2:1.10.2-1) UNRELEASED; urgency=low
+xorg-server (2:1.10.2-1) unstable; urgency=low
 
   * New upstream release.
   * Add 20-workaround-36986.diff to avoid test failures on *i386.
   * On GNU/kFreeBSD, enable HAL support for the main build, but disable it
     for the udeb build, thanks to Robert Millan (Closes: #596586).
 
- -- Cyril Brulebois <kibi@debian.org>  Mon, 30 May 2011 11:22:21 +0200
+ -- Cyril Brulebois <kibi@debian.org>  Mon, 30 May 2011 11:37:37 +0200
 
 xorg-server (2:1.10.1.901-1) experimental; urgency=low
 

commit 4ee10d0849a2642ba1ef342a843a7d574d1ee30d
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon May 30 11:37:22 2011 +0200

    On GNU/kFreeBSD, enable HAL support for the main build, but disable it for the udeb build, thanks to Robert Millan (Closes: #596586).

diff --git a/debian/changelog b/debian/changelog
index d1da2d0..f4da03e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ xorg-server (2:1.10.2-1) UNRELEASED; urgency=low
 
   * New upstream release.
   * Add 20-workaround-36986.diff to avoid test failures on *i386.
+  * On GNU/kFreeBSD, enable HAL support for the main build, but disable it
+    for the udeb build, thanks to Robert Millan (Closes: #596586).
 
  -- Cyril Brulebois <kibi@debian.org>  Mon, 30 May 2011 11:22:21 +0200
 
diff --git a/debian/rules b/debian/rules
index 87880af..7d1c012 100755
--- a/debian/rules
+++ b/debian/rules
@@ -69,7 +69,9 @@ config_backend = --disable-config-dbus
 ifeq ($(DEB_HOST_ARCH_OS), linux)
 	config_backend += --enable-config-udev --disable-config-hal
 else ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
-	config_backend += --disable-config-udev --enable-config-hal
+	config_backend += --disable-config-udev
+	config_backend_main += --enable-config-hal
+	config_backend_udeb += --disable-config-hal
 else # hurd
 	config_backend += --disable-config-udev --disable-config-hal
 endif
@@ -146,6 +148,7 @@ confflags_main = \
 	$(build_xfbdev) \
 	--with-sha1=libgcrypt \
 	--enable-xcsecurity \
+	$(config_backend_main) \
 	$(void)
 
 confflags_udeb = \
@@ -176,6 +179,7 @@ confflags_udeb = \
 	--disable-xephyr \
 	--disable-xfbdev \
 	--with-sha1=nettle \
+	$(config_backend_udeb) \
 	$(void)
 
 $(STAMP_DIR)/autoreconf: $(STAMP_DIR)/stampdir $(QUILT_STAMPFN)

commit 4c8fbd4a01ee7146ed2451a3a0d248a3b802e1d3
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon May 30 11:32:13 2011 +0200

    Add 20-workaround-36986.diff to avoid test failures on *i386.

diff --git a/debian/changelog b/debian/changelog
index c062eee..d1da2d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xorg-server (2:1.10.2-1) UNRELEASED; urgency=low
 
   * New upstream release.
+  * Add 20-workaround-36986.diff to avoid test failures on *i386.
 
  -- Cyril Brulebois <kibi@debian.org>  Mon, 30 May 2011 11:22:21 +0200
 
diff --git a/debian/patches/20-workaround-36986.diff b/debian/patches/20-workaround-36986.diff
new file mode 100644
index 0000000..24b3cb9
--- /dev/null
+++ b/debian/patches/20-workaround-36986.diff
@@ -0,0 +1,14 @@
+Workaround fdo#36986 <http://bugs.freedesktop.org/show_bug.cgi?id=36986>
+--- a/test/input.c
++++ b/test/input.c
+@@ -1213,8 +1213,10 @@
+ 
+         g_assert(v);
+         g_assert(v->numAxes == num_axes);
++#if 0
+         g_assert(((void*)v->axisVal - (void*)v) % sizeof(double) == 0);
+         g_assert(((void*)v->axes - (void*)v) % sizeof(double) == 0);
++#endif
+         num_axes ++;
+     }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 2e0f947..a9c30f6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 07-xfree86-fix-build-with-xv-disabled.diff
 #13_debian_add_xkbpath_env_variable.diff
 15-nouveau.diff
+20-workaround-36986.diff

commit 4b44aa8a9dca344ab61ee7e0d511a2d44124e65b
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon May 30 11:22:34 2011 +0200

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 047e8cf..a914e76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,181 @@
+commit d784fd09dc277610d5f4e98d577c4fdcd9215f9c
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat May 28 16:59:05 2011 -0700
+
+    configure.ac: Bump version to 1.10.2
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 398114c1489fbfc9fe487de38ff4a4176755eee6
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sun May 22 10:18:36 2011 -0700
+
+    XQuartz: Don't crash if CG increases our display resolution
+    
+    miPaintWindow would cause fbFill() to overwrite pScreen's pixmap which was
+    sized for the old resolution.
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 1fb501ad1521cfedaa5cf3052d45a924ef1866cf)
+
+commit dc6efd99887c90bb14e066e46b69ca5ba19b6a09
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sun May 22 09:32:57 2011 -0700
+
+    XQuartz: RandR: Don't crash if X11 is launched while there are no attached displays
+    
+    If CG reports no displays when launching, we could crash in RandR.  Instead, just
+    provide a fake 800x600 display until we are notified about displays being attached.
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 60af79e35ee8546a99d15a1358aac3deabfa22be)
+
+commit 1a665a8abd0ce1dbc50a1d889f11d5b74c78539e
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Fri May 20 22:59:27 2011 -0700
+
+    configure.ac: Bump version to 1.10.1.902 (1.10.2 RC2)
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 52e27b446a69b4b196d7e59d4e92aaa073c83dae
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Mon May 16 21:07:13 2011 -0700
+
+    XQuartz: Bump bundle version to 2.6.3
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit b4cb37d7255746f2ddf0ceb3334fc698cd818410
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat May 14 18:33:57 2011 -0700
+
+    XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode.
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 384eb45b944a4386eae74a5503423c13b5f2a659)
+
+commit 69e3527e257af2aae82449bf0e0e7846ccd1ce0c
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat May 14 16:11:32 2011 -0700
+
+    XQuartz: Don't call mieqEnqueue during server shutdown
+    
+    Found-by: GuardMalloc
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 25191648b8db87735a99243697f73036255c1eb6)
+
+commit 0a61aca1ed036b17cab48725eb6ab4d860c9aad8
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Apr 19 19:02:54 2011 -0700
+
+    Clean up memory better when GetVisualInfo fails in ProcDbeGetVisualInfo
+    
+    Use calloc to initialize pScrVisInfo array so we don't have to check
+    which ones were already initialized when freeing them all.
+    
+    On failure, set rc if necessary, and jump to code at end that already
+    frees all the necessary allocations and return rc.
+    
+    Fixes parfait reported error:
+    Error: Memory leak (CWE 401)
+       Memory leak of pointer 'pScrVisInfo' allocated with malloc((count * 16))
+            at line 724 of dbe/dbe.c in function 'ProcDbeGetVisualInfo'.
+              'pScrVisInfo' allocated at line 693 with malloc((count * 16)).
+              pScrVisInfo leaks when rc != 0 at line 710
+                  and j >= i at line 716.
+    
+    [ This bug was found by the Parfait 0.3.7 bug checking tool.
+      For more information see http://labs.oracle.com/projects/parfait/ ]
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 043c1758652259fd12b88ae37720fe6e93eda76b)
+
+commit 5be7451367901c13a697ecefcb634920cd156cb7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Apr 19 18:53:22 2011 -0700
+
+    Only free pContext once when AddResource fails in ProcRecordCreateContext
+    
+    Since RecordDeleteContext frees its argument, don't fall through to free
+    it again.
+    
+    Error: Double free (CWE 415)
+       Double free of pointer 'malloc(1072)' defined by malloc
+            at line 1964 of record/record.c in function 'ProcRecordCreateContext'.
+              Previously freed at line 1960 with RecordDeleteContext.
+              'malloc(1072)' was allocated at line 1926 with malloc.
+    
+    [ This bug was found by the Parfait 0.3.7 bug checking tool.
+      For more information see http://labs.oracle.com/projects/parfait/ ]
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit dadb0791ebfd05cd3bb82d4addf0fbc21aad6fbb)
+
+commit ee69c1aa7c1066b2019bf916230332c60a837ecb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Mar 11 15:43:14 2011 -0800
+
+    Make xorg.conf.example rule compatible with Solaris make
+    
+    Solaris make won't substitute $< in explicit rules, only implicit ones
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
+    (cherry picked from commit 8d229c4cf9e5bde78373ef3dd32708817ac97152)
+
+commit 189d44e7d216cc7b13f3e5a22689f2841a08b421
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Tue May 10 23:42:46 2011 -0700
+
+    XQuartz: Don't call into CoreFoundation after fork() and before exec()
+    
+    After fork()ing, we should just limit ourselves to setting up
+    the environment, file descriptors, and exec()ing.
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit  c89a6f824eaf647d2b182f79fbd78f5bd1c3a27f)
+
+commit 277e18894492fdf6e5446bb90e8503c9cbc28b3b
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat Apr 23 20:49:27 2011 -0700
+
+    os: Silence warnings when building with clang
+    
+    access.c:1492:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses]
+            if ((host->family == FamilyServerInterpreted)) {
+                 ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
+    access.c:1492:20: note: use '=' to turn this equality comparison into an assignment
+            if ((host->family == FamilyServerInterpreted)) {
+                              ^~
+                              =
+    access.c:1492:20: note: remove extraneous parentheses around the comparison to silence this warning
+            if ((host->family == FamilyServerInterpreted)) {
+                ~             ^                         ~
+    
+    In file included from xstrans.c:8:
+    In file included from /usr/X11/include/X11/Xtrans/transport.c:62:
+    /usr/X11/include/X11/Xtrans/Xtranssock.c:262:5: error: implicit declaration of function 'ErrorF' is invalid in C99
+          [-Werror,-Wimplicit-function-declaration]
+        PRMSG (3,"SocketSelectFamily(%s)\n", family, 0, 0);
+        ^
+    
+    log.c:180:29: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
+            if (asprintf(&logFileName, fname, display) == -1)
+                                       ^~~~~
+    log.c:190:26: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
+                    if ((asprintf(&suffix, backup, display) == -1) ||
+                                           ^~~~~~
+    log.c:382:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
+            LogVWrite(verb, tmpBuf, args);
+                            ^~~~~~
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Jamey Sharp <jamey@minilop.net>
+    (cherry picked from commit c524f8bb768f886d413839bc22184098394c2559)
+
 commit 164ef01bd55a1d2c31620e9868f4cc3d032223a6
 Author: Jeremy Huddleston <jeremyhu@apple.com>
 Date:   Fri May 6 15:43:04 2011 -0700
diff --git a/debian/changelog b/debian/changelog
index 4c39950..c062eee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xorg-server (2:1.10.2-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Cyril Brulebois <kibi@debian.org>  Mon, 30 May 2011 11:22:21 +0200
+
 xorg-server (2:1.10.1.901-1) experimental; urgency=low
 
   * New upstream release (1.10.2 rc1):

commit 4621bb270a36d35d4ab67f1d7fb47674683dfc5b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed May 18 15:00:54 2011 +1000

    Add a property for device/product ID.
    
    In some cases, knowing about the device model number and the device's vendor
    is important to activate product-specific settings. Since this is
    nonetheless driver-specific, only provide the property but don't do anything
    with it.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/include/xserver-properties.h b/include/xserver-properties.h
index a49291b..2b1feab 100644
--- a/include/xserver-properties.h
+++ b/include/xserver-properties.h
@@ -35,6 +35,11 @@
 /* BOOL. If present, device is a virtual XTEST device */
 #define XI_PROP_XTEST_DEVICE  "XTEST Device"
 
+/* CARD32, 2 values, vendor, product.
+ * This property is set by the driver and may not be available for some
+ * drivers. Read-Only */
+#define XI_PROP_PRODUCT_ID "Device Product ID"
+
 /* Coordinate transformation matrix for absolute input devices
  * FLOAT, 9 values in row-major order, coordinates in 0..1 range:
  * [c0 c1 c2]   [x]

commit f26a5b9a994a980ab309bc7f3b4295a4992d81c2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jan 31 14:43:01 2011 +1000

    Xi: add device node property to known properties.
    
    Since the server has little choice (or even knowledge) of the actual device
    node used by the driver, this property is merely provided for
    standardisation. It is up to the driver to set it to the appropriate value,
    usually a device node in the form of /dev/input/event0 or similar.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Acked-by: Dan Nicholson <dbn.lists@gmail.com>

diff --git a/include/xserver-properties.h b/include/xserver-properties.h
index c6259ae..a49291b 100644
--- a/include/xserver-properties.h
+++ b/include/xserver-properties.h
@@ -42,6 +42,9 @@
  * [c6 c7 c8]   [1] */
 #define XI_PROP_TRANSFORM "Coordinate Transformation Matrix"
 
+/* STRING. Device node path of device */
+#define XI_PROP_DEVICE_NODE "Device Node"
+
 /* Pointer acceleration properties */
 /* INTEGER of any format */
 #define ACCEL_PROP_PROFILE_NUMBER "Device Accel Profile"

commit b6c7b9b2f39e970cedb6bc1e073f901e28cb0fa3
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Tue May 24 16:02:42 2011 -0700

    randr: check rotated virtual size limits correctly
    
    Commit d1107918d4626268803b54033a07405122278e7f introduced checks to
    the RandR path that cause RRSetScreenConfig requests to fail if the
    size is too large.  Unfortunately, when RandR 1.1 rotation is enabled
    it compares the rotated screen dimensions to the unrotated limits,
    which causes 90- and 270-degree rotation to fail unless your screen
    happens to be square:
    
      X Error of failed request:  BadValue (integer parameter out of range for operation)
        Major opcode of failed request:  153 (RANDR)
        Minor opcode of failed request:  2 (RRSetScreenConfig)
        Value in failed request:  0x780
        Serial number of failed request:  14
        Current serial number in output stream:  14
    
    Fix this by moving the check above the code that swaps the dimensions
    based on the rotation.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Tested-by: Robert Hooker <robert.hooker@canonical.com>
    Tested-by: Kent Baxley <kent.baxley@canonical.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 1bc1a9e..da6d48d 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -910,12 +910,6 @@ ProcRRSetScreenConfig (ClientPtr client)
      */
     width = mode->mode.width;
     height = mode->mode.height;
-    if (rotation & (RR_Rotate_90|RR_Rotate_270))
-    {
-	width = mode->mode.height;
-	height = mode->mode.width;
-    }
-
     if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
 	client->errorValue = width;
 	free(pData);
@@ -927,6 +921,12 @@ ProcRRSetScreenConfig (ClientPtr client)
 	return BadValue;
     }
 
+    if (rotation & (RR_Rotate_90|RR_Rotate_270))
+    {
+	width = mode->mode.height;
+	height = mode->mode.width;
+    }
+
     if (width != pScreen->width || height != pScreen->height)
     {
 	int	c;

commit 1b2d17748f0154da142e9b421d4f6a46e4e5a18c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun May 22 13:50:14 2011 -0700

    fbbltone.c: Mark bitmasks as unsigned ints
    
    Clears many Sun compiler warnings:
    "fbbltone.c", line 491: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 491: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 491: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 491: warning: initializer will be sign-extended: -16777216
    "fbbltone.c", line 491: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 491: warning: initializer will be sign-extended: -1
    "fbbltone.c", line 495: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 495: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 495: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 495: warning: initializer will be sign-extended: -256
    "fbbltone.c", line 495: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 495: warning: initializer will be sign-extended: -1
    "fbbltone.c", line 499: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 499: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 499: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 499: warning: initializer will be sign-extended: -65536
    "fbbltone.c", line 499: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 499: warning: initializer will be sign-extended: -1
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/fb/fbbltone.c b/fb/fbbltone.c
index 0a91575..67e7853 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -428,8 +428,8 @@ fbBltOne (FbStip    *src,
 
 #define Mask24(x,r) (Mask24Pos(x,r) < FB_UNIT ? \
 		     (Mask24Pos(x,r) < 0 ? \
-		      0xffffff >> Mask24Neg (x,r) : \
-		      0xffffff << Mask24Check(x,r)) : 0)
+		      0xffffffU >> Mask24Neg (x,r) : \
+		      0xffffffU << Mask24Check(x,r)) : 0)
 
 #define SelMask24(b,n,r)	((((b) >> n) & 1) * Mask24(n,r))
 

commit b5d828789c092c994722a896c252212e2b3614ab
Author: Simon Thum <simon.thum@gmx.de>
Date:   Thu Mar 10 21:03:40 2011 +0100

    xserver: remove AbsoluteClass, breaking the A(P|B)I
    
    This struct was unused and has been effectively removed in
    commit 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde
    Refs: xorg-server-1.10.0-133-g633b81e
    
    Remove the remainder, with an ABI bump to 13.0.
    
    Signed-off-by: Simon Thum <simon.thum@gmx.de>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/dix/devices.c b/dix/devices.c
index 9a4498b..0ccf252 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1361,15 +1361,6 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
 }
 
 Bool
-InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
-{
-    /* This is an API-preserving noop. Instructions: Kill when no more drivers
-     * call it. The infrastructure behind hasn't really been used, so any calls
-     * are likely just a declaration that the device is absolute. */
-    return FALSE;
-}
-
-Bool
 InitFocusClassDeviceStruct(DeviceIntPtr dev)
 {
     FocusClassPtr focc;
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 94f17e9..2a5c805 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -83,7 +83,7 @@ typedef enum {
  */
 #define ABI_ANSIC_VERSION	SET_ABI_VERSION(0, 4)
 #define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(11, 0)
-#define ABI_XINPUT_VERSION	SET_ABI_VERSION(12, 2)
+#define ABI_XINPUT_VERSION	SET_ABI_VERSION(13, 0)
 #define ABI_EXTENSION_VERSION	SET_ABI_VERSION(5, 0)
 #define ABI_FONT_VERSION	SET_ABI_VERSION(0, 6)
 
diff --git a/include/input.h b/include/input.h
index 4de4ff5..56847ed 100644
--- a/include/input.h
+++ b/include/input.h
@@ -305,12 +305,6 @@ extern _X_EXPORT Bool InitPointerAccelerationScheme(
     DeviceIntPtr /*dev*/,
     int /*scheme*/);
 
-/**
- * This is not implemented and just returns FALSE.
- */
-extern _X_EXPORT _X_DEPRECATED Bool InitAbsoluteClassDeviceStruct(
-    DeviceIntPtr /*device*/);
-
 extern _X_EXPORT Bool InitFocusClassDeviceStruct(
     DeviceIntPtr /*device*/);
 
diff --git a/include/inputstr.h b/include/inputstr.h
index bc0accc..00f72c2 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -371,7 +371,6 @@ typedef struct _ClassesRec {
     ButtonClassPtr	button;
     FocusClassPtr	focus;
     ProximityClassPtr	proximity;
-    void*               _pad0; /* keep ABI during AbsoluteClass removal */
     KbdFeedbackPtr	kbdfeed;
     PtrFeedbackPtr	ptrfeed;
     IntegerFeedbackPtr	intfeed;
@@ -496,7 +495,6 @@ typedef struct _DeviceIntRec {
     ButtonClassPtr	button;
     FocusClassPtr	focus;
     ProximityClassPtr	proximity;
-    void*               _pad0;          /* keep ABI, was pointer to abs class */
     KbdFeedbackPtr	kbdfeed;
     PtrFeedbackPtr	ptrfeed;
     IntegerFeedbackPtr	intfeed;

commit c05c8640f13708384e77579e7714ca846fa93f5c
Author: Oleh Nykyforchyn <oleh.nyk@gmail.com>
Date:   Thu May 19 09:39:52 2011 +0300

    xfree86: Allow "MatchLayout" statements in config files
    
    Usage example (tested on a dual-seat PC):
    Section "InputClass"
     	Identifier "keyboard-all"
     	MatchIsKeyboard "on"
     	MatchDevicePath "/dev/input/event*"
     	MatchLayout "!GeForce|!Matrox"
     	Driver "evdev"
     	Option "XkbLayout" "us"
     	Option "XkbOptions" "terminate:ctrl_alt_bksp"
    EndSection
    
    It disables auto keyboard configuration for layouts "GeForce" and "Matrox".
    Note that "" in patterns means "no Layout sections found", e.g.
     	MatchLayout "GeForce|"
    is "in layout GeForce or without explicit layout at all".
    
    Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Acked-by: Dan Nicholson <dbn.lists@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index e7e1ce1..26051ad 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -470,6 +470,20 @@ match_path_pattern(const char *attr, const char *pattern)
 #endif
 
 /*
+ * If no Layout section is found, xf86ServerLayout.id becomes "(implicit)"
+ * It is convenient that "" in patterns means "no explicit layout"
+ */
+static int
+match_string_implicit(const char *attr, const char *pattern)
+{
+    if (strlen(pattern)) {
+        return strcmp(attr, pattern);
+    } else {
+        return strcmp(attr,"(implicit)");
+    }
+}
+
+/*
  * Match an attribute against a list of NULL terminated arrays of patterns.
  * If a pattern in each list entry is matched, return TRUE.
  */
@@ -564,6 +578,13 @@ InputClassMatches(const XF86ConfInputClassPtr iclass, const InputInfoPtr idev,
             return FALSE;
     }
 
+    /* MatchLayout string */
+    if (!list_is_empty(&iclass->match_layout)) {
+        if (!MatchAttrToken(xf86ConfigLayout.id,
+                            &iclass->match_layout, match_string_implicit))
+            return FALSE;
+    }
+
     /* MatchIs* booleans */
     if (iclass->is_keyboard.set &&
         iclass->is_keyboard.val != !!(attrs->flags & ATTR_KEYBOARD))
diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
index 4bec316..f406f82 100644
--- a/hw/xfree86/man/xorg.conf.man
+++ b/hw/xfree86/man/xorg.conf.man
@@ -1140,6 +1140,16 @@ matches the
 pattern. A match is found if at least one of the tags given in
 .RI \*q matchtag \*q
 matches at least one of the tags assigned by the backend.
+.TP 7
+.BI "MatchLayout \*q" matchlayout \*q
+Check the case-sensitive string
+.RI \*q matchlayout \*q
+against the currently active
+.B ServerLayout
+section. The empty string "" matches an implicit layout which appears
+if no named
+.B ServerLayout
+sections have been found.
 .PP
 The second type of entry is used to match device types. These entries take a
 boolean argument similar to
diff --git a/hw/xfree86/parser/InputClass.c b/hw/xfree86/parser/InputClass.c
index 9f88e7e..3f80170 100644
--- a/hw/xfree86/parser/InputClass.c
+++ b/hw/xfree86/parser/InputClass.c
@@ -52,6 +52,7 @@ xf86ConfigSymTabRec InputClassTab[] =
     {MATCH_USBID, "matchusbid"},
     {MATCH_DRIVER, "matchdriver"},
     {MATCH_TAG, "matchtag"},
+    {MATCH_LAYOUT, "matchlayout"},
     {MATCH_IS_KEYBOARD, "matchiskeyboard"},
     {MATCH_IS_POINTER, "matchispointer"},
     {MATCH_IS_JOYSTICK, "matchisjoystick"},
@@ -94,6 +95,7 @@ xf86parseInputClassSection(void)
     list_init(&ptr->match_usbid);
     list_init(&ptr->match_driver);
     list_init(&ptr->match_tag);
+    list_init(&ptr->match_layout);
 
     while ((token = xf86getToken(InputClassTab)) != ENDSECTION) {
         switch (token) {
@@ -169,6 +171,12 @@ xf86parseInputClassSection(void)
             add_group_entry(&ptr->match_tag,
                             xstrtokenize(val.str, TOKEN_SEP));
             break;
+        case MATCH_LAYOUT:
+            if (xf86getSubToken(&(ptr->comment)) != STRING)
+                Error(QUOTE_MSG, "MatchLayout");
+            add_group_entry(&ptr->match_layout,
+                            xstrtokenize(val.str, TOKEN_SEP));
+            break;
         case MATCH_IS_KEYBOARD:
             if (xf86getSubToken(&(ptr->comment)) != STRING)
                 Error(QUOTE_MSG, "MatchIsKeyboard");
@@ -307,6 +315,13 @@ xf86printInputClassSection (FILE * cf, XF86ConfInputClassPtr ptr)
                         *cur);
             fprintf(cf, "\"\n");
         }
+        list_for_each_entry(group, &ptr->match_layout, entry) {
+            fprintf(cf, "\tMatchLayout     \"");
+            for (cur = group->values; *cur; cur++)
+                fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP,
+                        *cur);
+            fprintf(cf, "\"\n");
+        }
 
         if (ptr->is_keyboard.set)
             fprintf(cf, "\tIsKeyboard      \"%s\"\n",
@@ -392,6 +407,12 @@ xf86freeInputClassList (XF86ConfInputClassPtr ptr)
                 free(*list);
             free(group);
         }
+        list_for_each_entry_safe(group, next, &ptr->match_layout, entry) {
+            list_del(&group->entry);
+            for (list = group->values; *list; list++)
+                free(*list);
+            free(group);
+        }
 
         TestFree(ptr->comment);
         xf86optionListFree(ptr->option_lst);
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index 4f279f1..a8785c5 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -358,6 +358,7 @@ typedef struct
 	struct list match_usbid;
 	struct list match_driver;
 	struct list match_tag;
+	struct list match_layout;
 	xf86TriState is_keyboard;
 	xf86TriState is_pointer;
 	xf86TriState is_joystick;
diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
index 468a2ff..abcafcf 100644
--- a/hw/xfree86/parser/xf86tokens.h
+++ b/hw/xfree86/parser/xf86tokens.h
@@ -282,6 +282,7 @@ typedef enum {
     MATCH_USBID,
     MATCH_DRIVER,
     MATCH_TAG,
+    MATCH_LAYOUT,
     MATCH_IS_KEYBOARD,
     MATCH_IS_POINTER,
     MATCH_IS_JOYSTICK,

commit 83c059f03463f2d7f41e172afe510d1ca9bba8b0
Author: Tomas Frydrych <tomas@sleepfive.com>
Date:   Wed May 18 20:49:52 2011 +0100

    Xephyr: fix pointer coordinate translation when screen is rotated
    
    In the Xephyr case the position of the pointer relative toward the
    Xephyr window is controlled by the host server without taking into
    account rotation of the Xephyr screen. Consequently the pointer coords
    must always be translated when the fb is rotated.
    
    Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 8096a24..ac8e5be 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -52,6 +52,7 @@ Bool ephyrNoDRI=FALSE ;
 Bool ephyrNoXV=FALSE ;
 
 static int mouseState = 0;
+static Rotation ephyrRandr = RR_Rotate_0;
 
 typedef struct _EphyrInputPrivate {
     Bool    enabled;
@@ -249,7 +250,11 @@ ephyrMapFramebuffer (KdScreenInfo *screen)
   EPHYR_LOG("screen->width: %d, screen->height: %d index=%d",
 	     screen->width, screen->height, screen->mynum);
   
-  KdComputePointerMatrix (&m, scrpriv->randr, screen->width, screen->height);
+  /*
+   * Use the rotation last applied to ourselves (in the Xephyr case the fb
+   * coordinate system moves independently of the pointer coordiante system).
+   */
+  KdComputePointerMatrix (&m, ephyrRandr, screen->width, screen->height);
   KdSetPointerMatrix (&m);
   
   priv->bytes_per_line = ((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
@@ -530,7 +535,15 @@ ephyrRandRSetConfig (ScreenPtr		pScreen,
    * Set new configuration
    */
   
-  scrpriv->randr = KdAddRotation (screen->randr, randr);
+  /*
+   * We need to store the rotation value for pointer coords transformation;
+   * though initially the pointer and fb rotation are identical, when we map
+   * the fb, the screen will be reinitialized and return into an unrotated
+   * state (presumably the HW is taking care of the rotation of the fb), but the
+   * pointer still needs to be transformed.
+   */
+  ephyrRandr = KdAddRotation (screen->randr, randr);
+  scrpriv->randr = ephyrRandr;
   
   ephyrUnmapFramebuffer (screen); 
   
@@ -1058,6 +1071,14 @@ MouseInit (KdPointerInfo *pi)
     pi->nButtons = 32;
     free(pi->name);
     pi->name = strdup("Xephyr virtual mouse");
+
+    /*
+     * Must transform pointer coords since the pointer position
+     * relative to the Xephyr window is controlled by the host server and
+     * remains constant regardless of any rotation applied to the Xephyr screen.
+     */
+    pi->transformCoordinates = TRUE;
+
     ephyrMouse = pi;
     return Success;
 }

commit b387069fafbe549f2091f364e2aa92af6cc21261
Author: Tomas Frydrych <tomas@sleepfive.com>
Date:   Wed May 18 20:47:52 2011 +0100

    Xephyr: added dummy ephyrDeviceCursorCleanup() to avoid crashing
    
    The DeviceCursorCleanup in miPointerSpriteFuncRec can no longer be
    NULL it seems.
    
    Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 27cab3b..2deb7b8 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -358,13 +358,18 @@ ephyrDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
   return TRUE;
 }
 
+static void
+ephyrDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+}
+
 miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
 	ephyrRealizeCursor,
 	ephyrUnrealizeCursor,
 	ephyrSetCursor,
 	ephyrMoveCursor,
 	ephyrDeviceCursorInitialize,
-	NULL
+	ephyrDeviceCursorCleanup
 };
 
 

commit 53ccc54ac71c2655276678e13f0b3d879d691489
Author: Colin Harrison <colin.harrison@virgin.net>
Date:   Mon May 16 19:31:57 2011 +0100

    Fix XWin compilation after updates for input API changes
    
    Fix XWin compilation after updates for input API changes in commits
    e7150db5 8670c46b and 20fb07f4
    
    Also remove a no longer needed InternalEvent* variable
    
    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 2fa6b3f..a3112ff 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -472,8 +472,6 @@ winKeybdReleaseKeys (void)
 void
 winSendKeyEvent (DWORD dwKey, Bool fDown)
 {
-  InternalEvent* events;
-
   /*
    * When alt-tabing between screens we can get phantom key up messages
    * Here we only pass them through it we think we should!
@@ -485,8 +483,8 @@ winSendKeyEvent (DWORD dwKey, Bool fDown)
 
   QueueKeyboardEvents(g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL);
 
-  winDebug("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
-           dwKey, fDown, nevents);
+  winDebug("winSendKeyEvent: dwKey: %d, fDown: %d\n",
+           dwKey, fDown);
 }
 
 BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam)
diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c
index b1b0657..752334a 100644
--- a/hw/xwin/winmouse.c
+++ b/hw/xwin/winmouse.c
@@ -244,8 +244,8 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
 		     POINTER_RELATIVE, &mask);
 
 #if CYGDEBUG
-  ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
-          iEventType, iButton, nevents);
+  ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d\n",
+          iEventType, iButton);
 #endif
 }
 

commit 4c4df3ac0d8162c874b85fede12ffbe42f0062c3
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sat May 14 16:23:59 2011 -0700

    input: Don't implicitly define verify_internal_event
    
    Fixes regression introduced by 56901998020b6f443cbaa5eb303100d979e81b22
    
    mieq.c:159:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue]
        verify_internal_event(e);
        ^
    1 error generated.
    
    Also includes some other warning cleanups in events.c we're there.
    
    events.c:2198:24: warning: equality comparison with extraneous parentheses [-Wparentheses,Semantic Issue]
            else if ((type == MotionNotify))
                      ~~~~~^~~~~~~~~~~~~~~
    events.c:2198:24: note: remove extraneous parentheses around the comparison to silence this warning [Semantic Issue]
            else if ((type == MotionNotify))
                     ~     ^              ~
    events.c:2198:24: note: use '=' to turn this equality comparison into an assignment [Semantic Issue]
            else if ((type == MotionNotify))
                           ^~
                           =
    events.c:2487:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue]
        verify_internal_event(event);
        ^
    events.c:5909:22: warning: declaration shadows a local variable [-Wshadow,Semantic Issue]
            DeviceIntPtr it = inputInfo.devices;
                         ^
    events.c:5893:18: note: previous declaration is here
        DeviceIntPtr it = inputInfo.devices;
                     ^
    3 warnings and 1 error generated.
    
    events.c:2836:27: warning: incompatible pointer types passing 'DeviceEvent *' (aka 'struct _DeviceEvent *') to parameter of type
          'const InternalEvent *' (aka 'const union _InternalEvent *')
        verify_internal_event(ev);
                              ^~
    ../include/inpututils.h:40:56: note: passing argument to parameter 'ev' here
    extern void verify_internal_event(const InternalEvent *ev);
                                                           ^
    1 warning generated.
    
    Found-by: yuffie tinderbox (-Werror=implicit)
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/dix/events.c b/dix/events.c
index 14f6f90..b60c299 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -112,6 +112,7 @@ Equipment Corporation.
 #include <X11/Xproto.h>
 #include "windowstr.h"
 #include "inputstr.h"
+#include "inpututils.h"
 #include "scrnintstr.h"
 #include "cursorstr.h"
 
@@ -2195,7 +2196,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
          */
         if (!grab && ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask))
             /* grab activated */;
-        else if ((type == MotionNotify))
+        else if (type == MotionNotify)
             pDev->valuator->motionHintWindow = pWin;
         else if (type == DeviceMotionNotify || type == DeviceButtonPress)
                 CheckDeviceGrabAndHintWindow (pWin, type,
@@ -2832,7 +2833,7 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
     WindowPtr prevSpriteWin, newSpriteWin;
     SpritePtr pSprite = pDev->spriteInfo->sprite;
 
-    verify_internal_event(ev);
+    verify_internal_event((InternalEvent *)ev);
 
     prevSpriteWin = pSprite->win;


Reply to: