From: Michel Dänzer <[email protected]> xf86CursorScreenRec::HotX/Y contain 0 for PRIME slave screens.
Fixes incorrect HW cursor position on PRIME slave screens. Also hoist the hotspot translation out from xf86ScreenMoveCursor to xf86MoveCursor, since the hotspot position is a property of the cursor, not the screen. Signed-off-by: Michel Dänzer <[email protected]> --- hw/xfree86/ramdac/xf86HWCurs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c index e8966ed..8feb767 100644 --- a/hw/xfree86/ramdac/xf86HWCurs.c +++ b/hw/xfree86/ramdac/xf86HWCurs.c @@ -263,8 +263,8 @@ xf86ScreenMoveCursor(ScreenPtr pScreen, int x, int y) xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; - x -= infoPtr->pScrn->frameX0 + ScreenPriv->HotX; - y -= infoPtr->pScrn->frameY0 + ScreenPriv->HotY; + x -= infoPtr->pScrn->frameX0; + y -= infoPtr->pScrn->frameY0; (*infoPtr->SetCursorPosition) (infoPtr->pScrn, x, y); } @@ -272,8 +272,12 @@ xf86ScreenMoveCursor(ScreenPtr pScreen, int x, int y) void xf86MoveCursor(ScreenPtr pScreen, int x, int y) { + CursorPtr pCurs = xf86CurrentCursor(pScreen); ScreenPtr pSlave; + x -= pCurs->bits->xhot; + y -= pCurs->bits->yhot; + xf86ScreenMoveCursor(pScreen, x, y); /* ask each slave driver to move the cursor */ -- 2.9.3 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
