mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
Use focus policy for controlling input on X11
This commit is contained in:
parent
07342ca801
commit
ca688be41c
1 changed files with 1 additions and 1 deletions
2
glfw/x11_window.c
vendored
2
glfw/x11_window.c
vendored
|
|
@ -616,7 +616,7 @@ update_wm_hints(_GLFWwindow *window, const WindowGeometry *wg, const _GLFWwndcon
|
|||
hints->flags = StateHint | InputHint;
|
||||
hints->initial_state = NormalState;
|
||||
hints->input = true;
|
||||
if (is_layer_shell && (config.type == GLFW_LAYER_SHELL_BACKGROUND || config.type == GLFW_LAYER_SHELL_PANEL)) hints->input = false;
|
||||
if (is_layer_shell && config.focus_policy == GLFW_FOCUS_NOT_ALLOWED) hints->input = false;
|
||||
XSetWMHints(_glfw.x11.display, window->x11.handle, hints);
|
||||
XFree(hints);
|
||||
} else _glfwInputError(GLFW_OUT_OF_MEMORY, "X11: Failed to allocate WM hints");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue