mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-12 10:28:08 +00:00
[client] core: workaround windows mouse information problem
Under windows there is no cursor enabled at all until it has been moved for the fist time by the user. If our cursor information is invalid we assume that this has occured and induce a wiggle to force windows to create the cursor.
This commit is contained in:
@@ -479,7 +479,19 @@ void core_handleMouseNormal(double ex, double ey)
|
||||
{
|
||||
// prevent cursor handling outside of capture if the position is not known
|
||||
if (!g_cursor.guest.valid)
|
||||
{
|
||||
if (app_guestIsWindows())
|
||||
{
|
||||
// wiggle the mouse when the guest has not provided any information, we need
|
||||
// to do this because windows doesn't enable a cursor at all until it has
|
||||
// been moved for the first time.
|
||||
if (!purespice_mouseMotion(1, 1))
|
||||
DEBUG_ERROR("failed to send mouse motion message");
|
||||
if (!purespice_mouseMotion(-1, -1))
|
||||
DEBUG_ERROR("failed to send mouse motion message");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_cursor.realigning)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user