mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-13 01: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;
|
break;
|
||||||
|
|
||||||
case FocusIn:
|
case FocusIn:
|
||||||
|
if (!params.useSpiceInput)
|
||||||
|
break;
|
||||||
|
|
||||||
if (xe.xfocus.mode == NotifyNormal ||
|
if (xe.xfocus.mode == NotifyNormal ||
|
||||||
xe.xfocus.mode == NotifyUngrab)
|
xe.xfocus.mode == NotifyUngrab)
|
||||||
keyboardGrab();
|
keyboardGrab();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FocusOut:
|
case FocusOut:
|
||||||
|
if (!params.useSpiceInput)
|
||||||
|
break;
|
||||||
|
|
||||||
if (xe.xfocus.mode == NotifyNormal ||
|
if (xe.xfocus.mode == NotifyNormal ||
|
||||||
xe.xfocus.mode == NotifyWhileGrabbed)
|
xe.xfocus.mode == NotifyWhileGrabbed)
|
||||||
keyboardUngrab();
|
keyboardUngrab();
|
||||||
@ -1854,7 +1860,7 @@ int main(int argc, char * argv[])
|
|||||||
if (!config_load(argc, argv))
|
if (!config_load(argc, argv))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (params.grabKeyboard)
|
if (params.useSpiceInput && params.grabKeyboard)
|
||||||
SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1");
|
SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1");
|
||||||
|
|
||||||
const int ret = lg_run();
|
const int ret = lg_run();
|
||||||
|
Loading…
Reference in New Issue
Block a user