mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 13:52:57 +00:00
[client] app: always track the mouse button state
This change fixes a bug on re-grab of the cursor if window focus was lost while a mouse button was held.
This commit is contained in:
parent
06f6a96b56
commit
c6af5be1dc
1 changed files with 4 additions and 4 deletions
|
@ -163,22 +163,22 @@ void spiceClipboardNotice(const SpiceDataType type)
|
|||
|
||||
void app_handleButtonPress(int button)
|
||||
{
|
||||
g_cursor.buttons |= (1U << button);
|
||||
|
||||
if (!core_inputEnabled() || !g_cursor.inView)
|
||||
return;
|
||||
|
||||
g_cursor.buttons |= (1U << button);
|
||||
|
||||
if (!spice_mouse_press(button))
|
||||
DEBUG_ERROR("app_handleButtonPress: failed to send message");
|
||||
}
|
||||
|
||||
void app_handleButtonRelease(int button)
|
||||
{
|
||||
g_cursor.buttons &= ~(1U << button);
|
||||
|
||||
if (!core_inputEnabled())
|
||||
return;
|
||||
|
||||
g_cursor.buttons &= ~(1U << button);
|
||||
|
||||
if (!spice_mouse_release(button))
|
||||
DEBUG_ERROR("app_handleButtonRelease: failed to send message");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue