Wayland KDE: Fix selecting in un-focused OS window not working correctly
Every day, in every way, I fall deeper and deeper in love with Yayland! Fixes #6095
This commit is contained in:
parent
e043fef257
commit
2bbf9a4e9b
@ -76,6 +76,8 @@ Detailed list of changes
|
||||
- Fix overlay windows not inheriting the per-window padding and margin settings
|
||||
of their parents (:iss:`6063`)
|
||||
|
||||
- Wayland KDE: Fix selecting in un-focused OS window not working correctly (:iss:`6095`)
|
||||
|
||||
|
||||
0.27.1 [2023-02-07]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
10
kitty/glfw.c
10
kitty/glfw.c
@ -434,8 +434,16 @@ static id_type focus_counter = 0;
|
||||
|
||||
static void
|
||||
window_focus_callback(GLFWwindow *w, int focused) {
|
||||
global_state.active_drag_in_window = 0;
|
||||
if (!set_callback_window(w)) return;
|
||||
// There exist some numbnut Wayland compositors, like kwin, that send mouse
|
||||
// press events before focus gained events. So only clear the active drag
|
||||
// window if it is not the focused window. See https://github.com/kovidgoyal/kitty/issues/6095
|
||||
if (
|
||||
(!focused && global_state.callback_os_window->id == global_state.active_drag_in_window) ||
|
||||
(focused && global_state.callback_os_window->id != global_state.active_drag_in_window)
|
||||
) {
|
||||
global_state.active_drag_in_window = 0;
|
||||
}
|
||||
global_state.callback_os_window->is_focused = focused ? true : false;
|
||||
if (focused) {
|
||||
show_mouse_cursor(w);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user