[client] remove grab/ungrab stubs

This commit is contained in:
Geoffrey McRae 2021-01-10 15:33:29 +11:00
parent 76ed75f871
commit 8466e57468

View file

@ -1124,26 +1124,6 @@ static void handleWindowEnter()
g_cursor.redraw = true; 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) static void setGrab(bool enable)
{ {
setGrabQuiet(enable); setGrabQuiet(enable);
@ -1417,7 +1397,10 @@ int eventFilter(void * userdata, SDL_Event * event)
if (xe.xfocus.mode == NotifyNormal || if (xe.xfocus.mode == NotifyNormal ||
xe.xfocus.mode == NotifyUngrab) xe.xfocus.mode == NotifyUngrab)
keyboardGrab(); {
if (params.grabKeyboardOnFocus)
wmGrabKeyboard();
}
break; break;
case FocusOut: case FocusOut:
@ -1432,7 +1415,10 @@ int eventFilter(void * userdata, SDL_Event * event)
if (g_cursor.grab) if (g_cursor.grab)
setGrab(false); setGrab(false);
else else
keyboardUngrab(); {
if (params.grabKeyboardOnFocus)
wmUngrabKeyboard();
}
} }
break; break;
} }