mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Implement grab keyboard for x11
This commit is contained in:
9
glfw/x11_window.c
vendored
9
glfw/x11_window.c
vendored
@@ -3386,8 +3386,13 @@ _glfwPlatformSetWindowBlur(_GLFWwindow *window, int blur_radius) {
|
||||
|
||||
bool
|
||||
_glfwPlatformGrabKeyboard(bool grab) {
|
||||
if (grab) _glfwInputError(GLFW_PLATFORM_ERROR, "X11: Grabbing of keyboard is not currently supported");
|
||||
return false;
|
||||
int result;
|
||||
if (grab) {
|
||||
result = XGrabKeyboard(_glfw.x11.display, _glfw.x11.root, True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||
} else {
|
||||
result = XUngrabKeyboard(_glfw.x11.display, CurrentTime);
|
||||
}
|
||||
return result == GrabSuccess;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user