mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +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
@ -163,22 +163,22 @@ void spiceClipboardNotice(const SpiceDataType type)
|
|||||||
|
|
||||||
void app_handleButtonPress(int button)
|
void app_handleButtonPress(int button)
|
||||||
{
|
{
|
||||||
|
g_cursor.buttons |= (1U << button);
|
||||||
|
|
||||||
if (!core_inputEnabled() || !g_cursor.inView)
|
if (!core_inputEnabled() || !g_cursor.inView)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_cursor.buttons |= (1U << button);
|
|
||||||
|
|
||||||
if (!spice_mouse_press(button))
|
if (!spice_mouse_press(button))
|
||||||
DEBUG_ERROR("app_handleButtonPress: failed to send message");
|
DEBUG_ERROR("app_handleButtonPress: failed to send message");
|
||||||
}
|
}
|
||||||
|
|
||||||
void app_handleButtonRelease(int button)
|
void app_handleButtonRelease(int button)
|
||||||
{
|
{
|
||||||
|
g_cursor.buttons &= ~(1U << button);
|
||||||
|
|
||||||
if (!core_inputEnabled())
|
if (!core_inputEnabled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_cursor.buttons &= ~(1U << button);
|
|
||||||
|
|
||||||
if (!spice_mouse_release(button))
|
if (!spice_mouse_release(button))
|
||||||
DEBUG_ERROR("app_handleButtonRelease: failed to send message");
|
DEBUG_ERROR("app_handleButtonRelease: failed to send message");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user