mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-13 01:38:20 +00:00
[client] remove grab/ungrab stubs
This commit is contained in:
parent
76ed75f871
commit
8466e57468
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user