mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[client] main: don't ignore keybinds when spice is disabled
This commit is contained in:
parent
10217fc8d9
commit
5d254c7751
@ -737,16 +737,10 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||||||
state.lgc->wmevent(event->syswm.msg);
|
state.lgc->wmevent(event->syswm.msg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!params.useSpiceInput)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
switch(event->type)
|
|
||||||
{
|
|
||||||
case SDL_MOUSEMOTION:
|
case SDL_MOUSEMOTION:
|
||||||
{
|
{
|
||||||
if (state.ignoreInput)
|
if (state.ignoreInput || !params.useSpiceInput)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -824,7 +818,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.ignoreInput)
|
if (state.ignoreInput || !params.useSpiceInput)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
uint32_t scancode = mapScancode(sc);
|
uint32_t scancode = mapScancode(sc);
|
||||||
@ -850,6 +844,8 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||||||
if (state.escapeActive)
|
if (state.escapeActive)
|
||||||
{
|
{
|
||||||
if (state.escapeAction == params.escapeKey)
|
if (state.escapeAction == params.escapeKey)
|
||||||
|
{
|
||||||
|
if (params.useSpiceInput)
|
||||||
{
|
{
|
||||||
serverMode = !serverMode;
|
serverMode = !serverMode;
|
||||||
spice_mouse_mode(serverMode);
|
spice_mouse_mode(serverMode);
|
||||||
@ -868,6 +864,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||||||
if (!serverMode)
|
if (!serverMode)
|
||||||
realignGuest = true;
|
realignGuest = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KeybindHandle handle = state.bindings[sc];
|
KeybindHandle handle = state.bindings[sc];
|
||||||
@ -878,7 +875,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||||||
state.escapeActive = false;
|
state.escapeActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.ignoreInput)
|
if (state.ignoreInput || !params.useSpiceInput)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// avoid sending key up events when we didn't send a down
|
// avoid sending key up events when we didn't send a down
|
||||||
@ -900,7 +897,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case SDL_MOUSEWHEEL:
|
case SDL_MOUSEWHEEL:
|
||||||
if (state.ignoreInput)
|
if (state.ignoreInput || !params.useSpiceInput)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -914,7 +911,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
if (state.ignoreInput)
|
if (state.ignoreInput || !params.useSpiceInput)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// The SPICE protocol doesn't support more than a standard PS/2 3 button mouse
|
// The SPICE protocol doesn't support more than a standard PS/2 3 button mouse
|
||||||
@ -931,7 +928,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
if (state.ignoreInput)
|
if (state.ignoreInput || !params.useSpiceInput)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// The SPICE protocol doesn't support more than a standard PS/2 3 button mouse
|
// The SPICE protocol doesn't support more than a standard PS/2 3 button mouse
|
||||||
|
Loading…
Reference in New Issue
Block a user