mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] don't grab keyboard if spice input is disabled
This commit is contained in:
parent
806ff934b2
commit
301ba45f0f
@ -1030,12 +1030,18 @@ int eventFilter(void * userdata, SDL_Event * event)
|
||||
break;
|
||||
|
||||
case FocusIn:
|
||||
if (!params.useSpiceInput)
|
||||
break;
|
||||
|
||||
if (xe.xfocus.mode == NotifyNormal ||
|
||||
xe.xfocus.mode == NotifyUngrab)
|
||||
keyboardGrab();
|
||||
break;
|
||||
|
||||
case FocusOut:
|
||||
if (!params.useSpiceInput)
|
||||
break;
|
||||
|
||||
if (xe.xfocus.mode == NotifyNormal ||
|
||||
xe.xfocus.mode == NotifyWhileGrabbed)
|
||||
keyboardUngrab();
|
||||
@ -1854,7 +1860,7 @@ int main(int argc, char * argv[])
|
||||
if (!config_load(argc, argv))
|
||||
return -1;
|
||||
|
||||
if (params.grabKeyboard)
|
||||
if (params.useSpiceInput && params.grabKeyboard)
|
||||
SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1");
|
||||
|
||||
const int ret = lg_run();
|
||||
|
Loading…
Reference in New Issue
Block a user