Imported Debian patch 2:1.11.4-0ubuntu8
authorChase Douglas <chase.douglas@ubuntu.com>
Fri, 30 Mar 2012 01:09:19 +0000 (18:09 -0700)
committerXavier Boudet <x-boudet@ti.com>
Fri, 30 Mar 2012 16:49:07 +0000 (16:49 +0000)
debian/changelog
debian/control
debian/patches/227_null_ptr_midispcur.patch [new file with mode: 0644]
debian/patches/503_fix_mouse_warp.patch [new file with mode: 0644]
debian/patches/504_implement_passive_touch_ungrab.patch [new file with mode: 0644]
debian/patches/series
hw/xfree86/common/xf86Config.c
hw/xfree86/common/xf86Init.c

index 4bc443cf9e54095c1f4c5609a0e727d39809c786..bd2be2cef5da58c7bc78ca13b89f199195431a8f 100644 (file)
@@ -1,3 +1,24 @@
+xorg-server (2:1.11.4-0ubuntu8) precise; urgency=low
+
+  [ Chase Douglas ]
+  * Fix crash at startup due to input option abi break (LP: #931397)
+    - Revert two commits from upstream 1.12 input stack
+
+  [ Bryce Harrington ]
+  * debian/patches/227_null_ptr_midispcur.patch:
+    - Check for NULL pointer before dereferencing pointer from
+      miGetDCDevice.  Fixes crash after connecting a bluetooth keyboard.
+      (LP: #930936)
+
+  [ Chase Douglas ]
+  * Fix mouse warping and clipping (LP: #948938)
+    - Add temporary patch 503_fix_mouse_warp.patch
+  * Implement passive touch ungrab (LP: #968726)
+    - Add temporary patch 503_implement_passive_touch_ungrab.patch
+  * Bump lintian standards to 3.9.3
+
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Thu, 29 Mar 2012 18:09:19 -0700
+
 xorg-server (2:1.11.4-0ubuntu7) precise; urgency=low
 
   * debian/patches/111_armel-drv-fallbacks.patch:
index 7da92bf9e71c7d5a4e08a87c31e00e4e1cd9828c..04363fdaa93f14b076a20007c4a2fe87e89645be 100644 (file)
@@ -78,7 +78,7 @@ Build-Depends:
 # unit tests
  xkb-data,
  x11-xkb-utils,
-Standards-Version: 3.9.2
+Standards-Version: 3.9.3
 Vcs-Git: git://git.debian.org/git/pkg-xorg/xserver/xorg-server
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/xserver/xorg-server.git
 
diff --git a/debian/patches/227_null_ptr_midispcur.patch b/debian/patches/227_null_ptr_midispcur.patch
new file mode 100644 (file)
index 0000000..6d871ee
--- /dev/null
@@ -0,0 +1,14 @@
+diff -u a/mi/midispcur.c b/mi/midispcur.c
+--- a/mi/midispcur.c    2011-08-05 09:59:03.000000000 +0400
++++ b/mi/midispcur.c    2012-02-16 10:07:52.524576132 +0400
+@@ -479,6 +479,10 @@
+     GCPtr          pGC;
+
+     pBuffer = miGetDCDevice(pDev, pScreen);
++
++    if (!pBuffer)
++       return FALSE;
++
+     pSave = pBuffer->pSave;
+
+     pWin = pScreen->root;
diff --git a/debian/patches/503_fix_mouse_warp.patch b/debian/patches/503_fix_mouse_warp.patch
new file mode 100644 (file)
index 0000000..d0e9d66
--- /dev/null
@@ -0,0 +1,52 @@
+Subject: dix: set raw event values before adding up relative values (#46976)
+Date: Wed, 21 Mar 2012 04:09:18 -0000
+From: Peter Hutterer <peter.hutterer@who-t.net>
+
+Regression introduced in 4e52cc0ef48145134cd58d357fb7289e6f8bb709
+
+Raw event values are values as-is from the driver, modified only be
+transformation or acceleration. 4e52cc caused the mask to be updated from
+driver-submitted relative to device-absolute coordinates, and that mask was
+then written into the raw events.
+
+Move the raw event update into the respective branches for absolute/relative
+events.
+
+X.Org Bug 46976 <http://bugs.freedesktop.org/show_bug.cgi?id=46976>
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+Reviewed-by: Simon Thum <simon.thum@gmx.de>
+
+---
+dix/getevents.c |    9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/dix/getevents.c b/dix/getevents.c
+index 5b9cef3..fd5998d 100644
+--- a/dix/getevents.c
++++ b/dix/getevents.c
+@@ -1311,17 +1311,18 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
+         transformAbsolute(pDev, &mask);
+         clipAbsolute(pDev, &mask);
++        if ((flags & POINTER_NORAW) == 0)
++            set_raw_valuators(raw, &mask, raw->valuators.data);
+     } else {
+         if (flags & POINTER_ACCELERATE)
+             accelPointer(pDev, &mask, ms);
++        if ((flags & POINTER_NORAW) == 0)
++            set_raw_valuators(raw, &mask, raw->valuators.data);
++
+         moveRelative(pDev, &mask);
+     }
+     /* valuators are in device coordinate system in absolute coordinates */
+-
+-    if ((flags & POINTER_NORAW) == 0)
+-        set_raw_valuators(raw, &mask, raw->valuators.data);
+-
+     scale_to_desktop(pDev, &mask, &devx, &devy, &screenx, &screeny);
+     scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative,
+                          &mask, &devx, &devy, &screenx, &screeny);
diff --git a/debian/patches/504_implement_passive_touch_ungrab.patch b/debian/patches/504_implement_passive_touch_ungrab.patch
new file mode 100644 (file)
index 0000000..48e8a0a
--- /dev/null
@@ -0,0 +1,36 @@
+Implement passive touch ungrabbing. (LP: #968726)
+
+diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
+index d911702..89a285f 100644
+--- a/Xi/xipassivegrab.c
++++ b/Xi/xipassivegrab.c
+@@ -303,14 +303,16 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
+     if (stuff->grab_type != XIGrabtypeButton &&
+         stuff->grab_type != XIGrabtypeKeycode &&
+         stuff->grab_type != XIGrabtypeEnter &&
+-        stuff->grab_type != XIGrabtypeFocusIn)
++        stuff->grab_type != XIGrabtypeFocusIn &&
++        stuff->grab_type != XIGrabtypeTouchBegin)
+     {
+         client->errorValue = stuff->grab_type;
+         return BadValue;
+     }
+     if ((stuff->grab_type == XIGrabtypeEnter ||
+-         stuff->grab_type == XIGrabtypeFocusIn) && stuff->detail != 0)
++         stuff->grab_type == XIGrabtypeFocusIn ||
++         stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0)
+     {
+         client->errorValue = stuff->detail;
+         return BadValue;
+@@ -336,6 +338,7 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
+         case XIGrabtypeKeycode:  tempGrab->type = XI_KeyPress;    break;
+         case XIGrabtypeEnter:   tempGrab->type = XI_Enter;       break;
+         case XIGrabtypeFocusIn: tempGrab->type = XI_FocusIn;     break;
++        case XIGrabtypeTouchBegin: tempGrab->type = XI_TouchBegin; break;
+     }
+     tempGrab->grabtype = XI2;
+     tempGrab->modifierDevice = mod_dev;
+-- 
+1.7.9.1
+
index fde46538aba6b566026b7647ee50d89859878bad..50bfb358b99fe0fa2ebbe553818e5369062ec3ac 100644 (file)
@@ -34,3 +34,5 @@
 500_pointer_barrier_thresholds.diff
 501_touch_accept_end.patch
 502_indirect_touch_window_set.patch
+503_fix_mouse_warp.patch
+504_implement_passive_touch_ungrab.patch
index f93724bd4bb167f2e148098b255dcc1c0650a9ed..b831d9a91c4a35f4ed0c27807f09c82ab95b4af4 100644 (file)
@@ -1239,10 +1239,6 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
        if (foundPointer) {
            Pointer->options = xf86AddNewOption(Pointer->options,
                                                "CorePointer", "on");
-           Pointer->options = xf86AddNewOption(Pointer->options,
-                                               "driver", confInput->inp_driver);
-           Pointer->options = xf86AddNewOption(Pointer->options,
-                                               "identifier", confInput->inp_identifier);
            servlayoutp->inputs = addDevice(servlayoutp->inputs, Pointer);
        }
     }
@@ -1333,10 +1329,6 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
        if (foundKeyboard) {
            Keyboard->options = xf86AddNewOption(Keyboard->options,
                                                 "CoreKeyboard", "on");
-           Keyboard->options = xf86AddNewOption(Keyboard->options,
-                                                "driver", confInput->inp_driver);
-           Keyboard->options = xf86AddNewOption(Keyboard->options,
-                                                "identifier", confInput->inp_identifier);
            servlayoutp->inputs = addDevice(servlayoutp->inputs, Keyboard);
        }
     }
index 0a4714078d420837574b93c5b91f83b3f57054cf..5ee68cd2657cfe414c5ad2290fe4306e9f04a303 100644 (file)
@@ -791,6 +791,21 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
                                 NULL);
 }
 
+static InputInfoPtr
+duplicateDevice(InputInfoPtr pInfo)
+{
+    InputInfoPtr dup = calloc(1, sizeof(InputInfoRec));
+    if (dup) {
+        dup->name = strdup(pInfo->name);
+        dup->driver = strdup(pInfo->driver);
+        dup->options = xf86OptionListDuplicate(pInfo->options);
+        /* type_name is a const string */
+        dup->type_name = pInfo->type_name;
+        dup->fd = -1;
+    }
+    return dup;
+}
+
 /**
  * Initialize all supported input devices present and referenced in the
  * xorg.conf.
@@ -807,10 +822,20 @@ InitInput(int argc, char **argv)
 
     /* Initialize all configured input devices */
     for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
-        (*pInfo)->options = xf86AddNewOption((*pInfo)->options, "driver", (*pInfo)->driver);
-        (*pInfo)->options = xf86AddNewOption((*pInfo)->options, "identifier", (*pInfo)->name);
+        InputInfoPtr dup;
+        /* Replace obsolete keyboard driver with kbd */
+        if (!xf86NameCmp((*pInfo)->driver, "keyboard")) {
+            strcpy((*pInfo)->driver, "kbd");
+        }
+
+        /* Data passed into xf86NewInputDevice will be freed on shutdown.
+         * Duplicate from xf86ConfigLayout.inputs, otherwise we don't have any
+         * xorg.conf input devices in the second generation
+         */
+        dup = duplicateDevice(*pInfo);
+
         /* If one fails, the others will too */
-        if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
+        if (xf86NewInputDevice(dup, &dev, TRUE) == BadAlloc)
             break;
     }