kitty/glfw
ttyS3 dc36e21654
fix(tabs): mouse handling stuck after aborted tab drag on Wayland
A quick click-and-flick on a tab could leave all of kitty with mouse
input permanently redirected to the tab bar, making every window
unclickable and text selection impossible.

Starting a tab drag is asynchronous: the drag thumbnail is rendered on
the next frame before glfwStartDrag is called. If the button is
released in that window, wl_data_device_start_drag is sent with a stale
serial that no longer matches an active pointer implicit grab, so the
compositor silently ignores it. The wl_data_source then never receives
any event, on_drag_source_finished never runs, and the
tab_being_dragged state is stuck forever, hijacking all mouse events.

Fix in layers:
- glfw/Wayland: track the implicit grab (serial of the first button
  press and pressed-button count), use that serial for start_drag and
  refuse with EAGAIN when there is no active implicit grab instead of
  letting the compositor silently drop the request
- mouse.c: a left button release arriving while a tab drag is marked
  started but no system DND is active means the drag never launched
  (an active DND consumes the release on all platforms), so clear the
  drag state instead of waiting for DND events that will never come
- tabs.py: handle OSError from start_drag_with_data for tab drags the
  same way window drags already do; clear the potential-drag state when
  the release lands on the new-tab button or empty tab bar area
- tabs.py/boss.py: clear drag state on drag finish/drop even when the
  dragged tab has already been closed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 03:43:25 +00:00
..
__init__.py
backend_utils.c Refactor drop API and implement it on Wayland 2026-02-08 22:05:14 +05:30
backend_utils.h DRYer 2026-02-07 23:11:42 +05:30
cocoa_displaylink.m Nano-optimisation: Avoid using a block with GCD 2025-10-22 13:40:42 +05:30
cocoa_init.m Add debug logging for NSDraggingSession 2026-05-14 08:16:03 +05:30
cocoa_joystick.h
cocoa_joystick.m
cocoa_monitor.m Add some missing assertions 2025-08-16 07:38:54 +05:30
cocoa_platform.h Rewrite macOS drop handling code to workaround Apple's insanely limited API 2026-05-16 13:06:23 +05:30
cocoa_window.m Fix #10054 2026-05-22 07:57:41 +05:30
context.c
dbus_glfw.c Linux: Handle desktop settings portals that are so old they don't implement ReadOne 2025-05-08 15:22:42 +05:30
dbus_glfw.h Linux: Handle desktop settings portals that are so old they don't implement ReadOne 2025-05-08 15:22:42 +05:30
egl_context.c Fallback to eglGetDisplay() when eglGetPlatformDisplayEXT() returns EGL_NO_DISPLAY 2025-08-16 08:13:40 +05:30
egl_context.h
glfw.py macos: explicitly enable modern window corners on macOS 26 2026-04-18 20:41:38 +08:00
glfw3.h Properly pass source actions to drop events 2026-05-14 11:07:52 +05:30
glx_context.c Add some missing assertions 2025-08-16 07:38:54 +05:30
glx_context.h
ibus_glfw.c Fix multiple security vulnerabilities across C, Python, and Go code 2026-04-03 16:10:46 +01:00
ibus_glfw.h
init.c
input.c glfw/input.c: fix dedup to swap duplicates to end instead of overwriting pointers 2026-05-19 02:12:29 +00:00
internal.h Properly pass source actions to drop events 2026-05-14 11:07:52 +05:30
kwin-blur-v1.xml
linux_desktop_settings.c ... 2025-11-22 20:03:01 +05:30
linux_desktop_settings.h
linux_joystick.c
linux_joystick.h
linux_notify.c Linux: Handle desktop settings portals that are so old they don't implement ReadOne 2025-05-08 15:22:42 +05:30
linux_notify.h
main_loop.h
mappings.h
memfd.h
momentum-scroll.c Fix #9904 2026-04-22 07:43:57 +05:30
monitor.c Improve handling of output names 2025-05-13 15:29:37 +05:30
monotonic.c
nsgl_context.h
nsgl_context.m Cleanup previous PR 2026-02-23 07:44:58 +05:30
null_init.c
null_joystick.c
null_joystick.h
null_monitor.c
null_platform.h
null_window.c More work on DnD kitten 2026-05-13 08:25:14 +05:30
osmesa_context.c Add some missing assertions 2025-08-16 07:38:54 +05:30
osmesa_context.h
posix_thread.c
posix_thread.h
source-info.json Wayland: Allow holding momentum scroll by putting two finger on touchpad. Fixes #9863 2026-04-14 09:39:57 +05:30
vulkan.c
window.c Fix spurious mouse release event during drag out of OS window 2026-03-26 14:00:57 +00:00
wl_client_side_decorations.c Support hide_window_decorations titlebar-only on Wayland 2026-02-08 19:49:44 +01:00
wl_client_side_decorations.h Wayland: Fix incorrect window size calculation when transitioning from fullscreen to non-fullscreen with client side decorations 2025-07-17 20:36:38 +05:30
wl_cursors.c
wl_cursors.h
wl_init.c fix(tabs): mouse handling stuck after aborted tab drag on Wayland 2026-06-10 03:43:25 +00:00
wl_monitor.c Add some missing assertions 2025-08-16 07:38:54 +05:30
wl_platform.h fix(tabs): mouse handling stuck after aborted tab drag on Wayland 2026-06-10 03:43:25 +00:00
wl_text_input.c
wl_text_input.h
wl_window.c fix(tabs): mouse handling stuck after aborted tab drag on Wayland 2026-06-10 03:43:25 +00:00
wlr-layer-shell-unstable-v1.xml
x11_init.c Implement source_actions for X11 and cocoa DnD backends 2026-05-14 05:46:21 +00:00
x11_monitor.c Add some missing assertions 2025-08-16 07:38:54 +05:30
x11_platform.h Implement source_actions for X11 and cocoa DnD backends 2026-05-14 05:46:21 +00:00
x11_window.c Fix #10082: Re-apply _NET_WM_STATE for X11 layer shell windows on each show 2026-05-28 02:07:59 +00:00
xkb-compat-shim.h
xkb_glfw.c Linux: Rather than crashing on systems that give us broken keymaps just ignore key events 2026-01-30 19:00:46 +05:30
xkb_glfw.h