mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-25 16:16:28 +00:00
[app] core: place the local cursor inside the window on capture
This commit is contained in:
parent
968fd42d46
commit
7c285a45fb
@ -141,6 +141,13 @@ void core_setGrabQuiet(bool enable)
|
|||||||
core_setCursorInView(true);
|
core_setCursorInView(true);
|
||||||
g_state.ignoreInput = false;
|
g_state.ignoreInput = false;
|
||||||
|
|
||||||
|
/* ensure the local mouse is inside the window before we capture, this fixes
|
||||||
|
* odd UI behaviour if the user is using focus follows mouse and the window
|
||||||
|
* was focused without the cursor being in window already */
|
||||||
|
struct DoublePoint local;
|
||||||
|
util_guestCurToLocal(&local);
|
||||||
|
core_warpPointer(local.x, local.y, true);
|
||||||
|
|
||||||
if (g_params.grabKeyboard)
|
if (g_params.grabKeyboard)
|
||||||
g_state.ds->grabKeyboard();
|
g_state.ds->grabKeyboard();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user