[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    [PATCH 3/3] xwayland: call through to miPointerWarpCursor on warp_cursor
From:       Peter Hutterer <peter.hutterer () who-t ! net>
Date:       2015-08-28 4:28:11
Message-ID: 1440736091-9303-3-git-send-email-peter.hutterer () who-t ! net
[Download RAW message or body]

This is (eventually) called during
InitializeSprite() → *pScreen->SetCursorPosition → miPointerSetCursorPosition
when a device is set to floating. We don't do anything special outselves, but
we need to pass on to the next layer to make sure the device is initialized
properly. Otherwise, pScreen stays NULL and eventually crashes the server when
we try to clean up behind us.

Test case: grab a device → floats it, ungrab again → crash

Reported-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
 hw/xwayland/xwayland-cursor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
index c137e1e..76729db 100644
--- a/hw/xwayland/xwayland-cursor.c
+++ b/hw/xwayland/xwayland-cursor.c
@@ -199,6 +199,7 @@ xwl_cross_screen(ScreenPtr pScreen, Bool entering)
 static void
 xwl_pointer_warp_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
 {
+    miPointerWarpCursor(pDev, pScreen, x, y);
 }
 
 static miPointerScreenFuncRec xwl_pointer_screen_funcs = {
-- 
2.4.3

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic