mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
Remove workaround for kwin sending out of order events press/focus events on Wayland as it is not needed with up-to-date kwin and causes issues with multiple OS windows.
The code wasnt correct anyway as active_draw_in_window was a window id and it was being compared to an OS window id. Fixes #7381
This commit is contained in:
@@ -88,6 +88,7 @@ Detailed list of changes
|
|||||||
|
|
||||||
- Dispatch any clicks waiting for :opt:`click_interval` on key events (:iss:`7601`)
|
- Dispatch any clicks waiting for :opt:`click_interval` on key events (:iss:`7601`)
|
||||||
|
|
||||||
|
- Wayland: Fix an issue with mouse selections not being stopped when there are multiple OS windows (:iss:`7381`)
|
||||||
|
|
||||||
0.35.2 [2024-06-22]
|
0.35.2 [2024-06-22]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -515,15 +515,6 @@ static void
|
|||||||
window_focus_callback(GLFWwindow *w, int focused) {
|
window_focus_callback(GLFWwindow *w, int focused) {
|
||||||
if (!set_callback_window(w)) return;
|
if (!set_callback_window(w)) return;
|
||||||
debug_input("\x1b[35mon_focus_change\x1b[m: window id: 0x%llu focused: %d\n", global_state.callback_os_window->id, focused);
|
debug_input("\x1b[35mon_focus_change\x1b[m: window id: 0x%llu focused: %d\n", global_state.callback_os_window->id, focused);
|
||||||
// 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;
|
global_state.callback_os_window->is_focused = focused ? true : false;
|
||||||
if (focused) {
|
if (focused) {
|
||||||
show_mouse_cursor(w);
|
show_mouse_cursor(w);
|
||||||
|
|||||||
Reference in New Issue
Block a user