mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 22:01:46 +00:00
[client] realign mouse when switching between capture modes
This commit is contained in:
parent
be792f33ce
commit
828cc1d4b7
1 changed files with 7 additions and 0 deletions
|
@ -425,6 +425,13 @@ int eventThread(void * arg)
|
|||
spice_mouse_mode(serverMode);
|
||||
SDL_SetRelativeMouseMode(serverMode);
|
||||
|
||||
if (!serverMode)
|
||||
{
|
||||
mouseX = state.shm->mouseX;
|
||||
mouseY = state.shm->mouseY;
|
||||
SDL_WarpMouseInWindow(state.window, mouseX, mouseY);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_INPUT_STATE
|
||||
DEBUG_INFO("mouse state:");
|
||||
for (unsigned int i = 0; i < sizeof(state.mouse) / sizeof(bool); ++i)
|
||||
|
|
Loading…
Reference in a new issue