[client] spice: do not allow the inView to be set if mouse buttons held

When using the meta resize feautre the cursor is over the client window,
and as such the application continues to receive motion events. This
causes the window size to spaz out.
This commit is contained in:
Geoffrey McRae 2021-01-19 04:40:31 +11:00
parent b92e547d91
commit dfe327301d

View File

@ -962,6 +962,11 @@ static void setCursorInView(bool enable)
if (enable && !g_state.focused)
return;
// do not allow the view to become active if any mouse buttons are being held,
// this fixes issues with meta window resizing.
if (enable && g_cursor.buttons)
return;
g_cursor.inView = enable;
g_cursor.draw = params.alwaysShowCursor ? true : enable;
g_cursor.redraw = true;