Mesa (18.2): st/nine: Avoid redundant SetCursorPos calls
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 3 12:42:51 UTC 2018
Module: Mesa
Branch: 18.2
Commit: ec9175a804d8022fd474e1873867b5af224ace19
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec9175a804d8022fd474e1873867b5af224ace19
Author: Axel Davy <davyaxel0 at gmail.com>
Date: Sat Sep 15 21:32:53 2018 +0200
st/nine: Avoid redundant SetCursorPos calls
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 <davyaxel0 at gmail.com>
CC: <mesa-stable at lists.freedesktop.org>
(cherry picked from commit dcfde02bb0f0b9fdd8d45a22540683fe0aaab9ec)
---
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 150f5e3e05..61eb5d9a45 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -784,6 +784,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;
More information about the mesa-commit
mailing list