summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2018-09-15 21:32:53 +0200
committerAxel Davy <[email protected]>2018-09-25 22:05:24 +0200
commitdcfde02bb0f0b9fdd8d45a22540683fe0aaab9ec (patch)
tree85a3f5c86a7afa699f863128b02cdd0b6ca5baee /src/gallium
parent112c7705973f619ac2a9bce8c8c53869256f69b4 (diff)
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 <[email protected]> CC: <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/nine/device9.c4
1 files changed, 4 insertions, 0 deletions
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;