summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 5690ab8)
raw | patch | inline | side by side (from parent 1: 5690ab8)
author | Marc Deslauriers <marc.deslauriers@ubuntu.com> | |
Tue, 12 Feb 2013 21:45:02 +0000 (16:45 -0500) | ||
committer | Xavier Boudet <x-boudet@ti.com> | |
Fri, 1 Mar 2013 08:03:05 +0000 (09:03 +0100) |
debian/changelog | patch | blob | history | |
debian/patches/238-xrandr-fix-panning.patch | [new file with mode: 0644] | patch | blob |
debian/patches/series | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
index 714c9b338f28babf1a5e8ee4f3827c1752ef79f6..4b68a246f376269ea6612e56b29f3810e413f4ec 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
+xorg-server (2:1.11.4-0ubuntu10.12) precise-proposed; urgency=low
+
+ * debian/patches/238-xrandr-fix-panning.patch: disable CRTC cursor
+ confinement when panning is enabled. (LP: #883319)
+
+ -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Tue, 12 Feb 2013 16:45:02 -0500
+
xorg-server (2:1.11.4-0ubuntu10.11) precise-proposed; urgency=low
* Drop 237-dix-set-the-device-transformation-matrix.patch:
diff --git a/debian/patches/238-xrandr-fix-panning.patch b/debian/patches/238-xrandr-fix-panning.patch
--- /dev/null
@@ -0,0 +1,129 @@
+Description: disable CRTC cursor confinement when panning is enabled
+Origin: backport, http://cgit.freedesktop.org/xorg/xserver/commit/?id=1bf81af4a6be1113bcc3b940ab264d5c9e0f0c5d
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39949
+
+Index: xorg-server-1.11.4/hw/xfree86/modes/xf86RandR12.c
+===================================================================
+--- xorg-server-1.11.4.orig/hw/xfree86/modes/xf86RandR12.c 2012-12-20 10:46:57.594909196 -0500
++++ xorg-server-1.11.4/hw/xfree86/modes/xf86RandR12.c 2012-12-20 10:52:27.706917648 -0500
+@@ -60,6 +60,9 @@
+ * See https://bugs.freedesktop.org/show_bug.cgi?id=21554
+ */
+ xf86EnterVTProc *orig_EnterVT;
++
++ Bool panning;
++ ConstrainCursorHarderProcPtr orig_ConstrainCursorHarder;
+ } XF86RandRInfoRec, *XF86RandRInfoPtr;
+
+ #ifdef RANDR_12_INTERFACE
+@@ -678,6 +681,10 @@
+ return TRUE;
+ }
+
++#define PANNING_ENABLED(crtc) \
++ ((crtc)->panningTotalArea.x2 > (crtc)->panningTotalArea.x1 || \
++ (crtc)->panningTotalArea.y2 > (crtc)->panningTotalArea.y1)
++
+ static Bool
+ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
+ CARD16 width,
+@@ -691,6 +698,7 @@
+ WindowPtr pRoot = pScreen->root;
+ PixmapPtr pScrnPix;
+ Bool ret = FALSE;
++ Bool panning = FALSE;
+ int c;
+
+ if (xf86RandR12Key) {
+@@ -711,8 +719,7 @@
+ /* Update panning information */
+ for (c = 0; c < config->num_crtc; c++) {
+ xf86CrtcPtr crtc = config->crtc[c];
+- if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1 ||
+- crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
++ if (PANNING_ENABLED (crtc)) {
+ if (crtc->panningTotalArea.x2 > crtc->panningTrackingArea.x1)
+ crtc->panningTotalArea.x2 += width - pScreen->width;
+ if (crtc->panningTotalArea.y2 > crtc->panningTrackingArea.y1)
+@@ -723,6 +730,7 @@
+ crtc->panningTrackingArea.y2 += height - pScreen->height;
+ xf86RandR13VerifyPanningArea (crtc, width, height);
+ xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
++ panning = TRUE;
+ }
+ }
+
+@@ -930,6 +938,7 @@
+ randrp = XF86RANDRINFO(pScreen);
+ #if RANDR_12_INTERFACE
+ xf86Screens[pScreen->myNum]->EnterVT = randrp->orig_EnterVT;
++ pScreen->ConstrainCursorHarder = randrp->orig_ConstrainCursorHarder;
+ #endif
+
+ free(randrp);
+@@ -1234,6 +1243,7 @@
+ }
+ xf86RandR13VerifyPanningArea (crtc, pScreen->width, pScreen->height);
+ xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
++ randrp->panning = PANNING_ENABLED (crtc);
+ /*
+ * Save the last successful setting for EnterVT
+ */
+@@ -1667,7 +1677,7 @@
+ BoxRec oldTotalArea;
+ BoxRec oldTrackingArea;
+ INT16 oldBorder[4];
+-
++ Bool oldPanning = randrp->panning;
+
+ if (crtc->version < 2)
+ return FALSE;
+@@ -1685,12 +1695,14 @@
+
+ if (xf86RandR13VerifyPanningArea (crtc, pScreen->width, pScreen->height)) {
+ xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
++ randrp->panning = PANNING_ENABLED (crtc);
+ return TRUE;
+ } else {
+ /* Restore old settings */
+ memcpy (&crtc->panningTotalArea, &oldTotalArea, sizeof(BoxRec));
+ memcpy (&crtc->panningTrackingArea, &oldTrackingArea, sizeof(BoxRec));
+ memcpy (crtc->panningBorder, oldBorder, 4*sizeof(INT16));
++ randrp->panning = oldPanning;
+ return FALSE;
+ }
+ }
+@@ -1775,6 +1787,21 @@
+ return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */
+ }
+
++static void
++xf86RandR13ConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, int *x, int *y)
++{
++ XF86RandRInfoPtr randrp = XF86RANDRINFO(screen);
++
++ if (randrp->panning)
++ return;
++
++ if (randrp->orig_ConstrainCursorHarder) {
++ screen->ConstrainCursorHarder = randrp->orig_ConstrainCursorHarder;
++ screen->ConstrainCursorHarder(dev, screen, mode, x, y);
++ screen->ConstrainCursorHarder = xf86RandR13ConstrainCursorHarder;
++ }
++}
++
+ static Bool
+ xf86RandR12Init12 (ScreenPtr pScreen)
+ {
+@@ -1803,6 +1830,10 @@
+ randrp->orig_EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = xf86RandR12EnterVT;
+
++ randrp->panning = FALSE;
++ randrp->orig_ConstrainCursorHarder = pScreen->ConstrainCursorHarder;
++ pScreen->ConstrainCursorHarder = xf86RandR13ConstrainCursorHarder;
++
+ if (!xf86RandR12CreateObjects12 (pScreen))
+ return FALSE;
+
diff --git a/debian/patches/series b/debian/patches/series
index 568115491cfad4e6d3eca93239bbaa7cac5e8fb8..8e758c8a16c6de8676a4879ccbb495d9c47d83c7 100644 (file)
--- a/debian/patches/series
+++ b/debian/patches/series
230_randr_catch_two_more_potential_unset_rrScrPriv_uses.patch
233-xf86events-valgrind.patch
235-composite-tracking.diff
+238-xrandr-fix-panning.patch
## Input Stack Patches (from xserver 1.12) ##
500_pointer_barrier_thresholds.diff
#514-Xi-drop-forced-unpairing-when-changing-the-hierarchy.patch
#515-dix-disable-all-devices-before-shutdown.patch
516-dix-dont-emulate-scroll-events-for-non-existing-axes.patch
-