[PATCH xserver] Panning: Set panning state in xf86RandR12ScreenSetSize()

Egbert Eich eich at freedesktop.org
Fri Jan 15 12:38:57 PST 2016


Right after verifying the panning area the per-crtc panning state should
be set. Since the panning state is global for all CRTCs, enable it if
enabled for one CRTC.
This fixes panning when set in the configuration.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=771521
Signed-off-by: Egbert Eich <eich at freedesktop.org>
---
 hw/xfree86/modes/xf86RandR12.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index eae7016..0c807bc 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -681,6 +681,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
     WindowPtr pRoot = pScreen->root;
     PixmapPtr pScrnPix;
     Bool ret = FALSE;
+    Bool panning = FALSE;
     int c;
 
     if (randrp->virtualX == -1 || randrp->virtualY == -1) {
@@ -709,6 +710,9 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
             if (crtc->panningTrackingArea.y2 > crtc->panningTrackingArea.y1)
                 crtc->panningTrackingArea.y2 += height - pScreen->height;
             xf86RandR13VerifyPanningArea(crtc, width, height);
+            if (!panning) {
+                panning = PANNING_ENABLED (crtc);
+            }
             xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY);
         }
     }
@@ -718,6 +722,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
     pScreen->height = pScrnPix->drawable.height = height;
     randrp->mmWidth = pScreen->mmWidth = mmWidth;
     randrp->mmHeight = pScreen->mmHeight = mmHeight;
+    randrp->panning = panning;
 
     xf86SetViewport(pScreen, pScreen->width - 1, pScreen->height - 1);
     xf86SetViewport(pScreen, 0, 0);
-- 
2.7.0



More information about the xorg-devel mailing list