For some applications SetCursorPosition is called when a cursor event is received.
Our SetCursorPosition was always calling wine SetCursorPos which would trigger a cursor event. The infinite loop is avoided by not calling SetCursorPos when the position hasn't changed. Found thanks to wine tests. Fixes irresponsive GUI for some applications. Fixes: https://github.com/iXit/Mesa-3D/issues/173 Signed-off-by: Axel Davy <davyax...@gmail.com> CC: <mesa-sta...@lists.freedesktop.org> --- src/gallium/state_trackers/nine/device9.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 113ba9d975d..b3e56d70b74 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -791,6 +791,10 @@ NineDevice9_SetCursorPosition( struct NineDevice9 *This, DBG("This=%p X=%d Y=%d Flags=%d\n", This, X, Y, Flags); + if (This->cursor.pos.x == X && + This->cursor.pos.y == Y) + return; + This->cursor.pos.x = X; This->cursor.pos.y = Y; -- 2.18.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev