mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 14:21:57 +00:00
[client] remove grab/ungrab stubs
This commit is contained in:
parent
76ed75f871
commit
8466e57468
1 changed files with 8 additions and 22 deletions
|
@ -1124,26 +1124,6 @@ static void handleWindowEnter()
|
|||
g_cursor.redraw = true;
|
||||
}
|
||||
|
||||
// only called for X11
|
||||
static void keyboardGrab()
|
||||
{
|
||||
if (!params.grabKeyboardOnFocus)
|
||||
return;
|
||||
|
||||
// grab the keyboard so we can intercept WM keys
|
||||
wmGrabKeyboard();
|
||||
}
|
||||
|
||||
// only called for X11
|
||||
static void keyboardUngrab()
|
||||
{
|
||||
if (!params.grabKeyboardOnFocus)
|
||||
return;
|
||||
|
||||
// ungrab the keyboard
|
||||
wmUngrabKeyboard();
|
||||
}
|
||||
|
||||
static void setGrab(bool enable)
|
||||
{
|
||||
setGrabQuiet(enable);
|
||||
|
@ -1417,7 +1397,10 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||
|
||||
if (xe.xfocus.mode == NotifyNormal ||
|
||||
xe.xfocus.mode == NotifyUngrab)
|
||||
keyboardGrab();
|
||||
{
|
||||
if (params.grabKeyboardOnFocus)
|
||||
wmGrabKeyboard();
|
||||
}
|
||||
break;
|
||||
|
||||
case FocusOut:
|
||||
|
@ -1432,7 +1415,10 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||
if (g_cursor.grab)
|
||||
setGrab(false);
|
||||
else
|
||||
keyboardUngrab();
|
||||
{
|
||||
if (params.grabKeyboardOnFocus)
|
||||
wmUngrabKeyboard();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue