Wayland (glfw/wl_window.c):
- Fix out-of-bounds access in send_drag_data: look up item by MIME type
instead of using the data-request index i to index _glfw.drag.items[].
The compositor calls drag_source_send once per target window entered,
so _glfw.wl.drag.count grows independently of item_count, causing
_glfw.drag.items[i] to be out-of-bounds on the second drag, yielding a
garbage optional_data pointer that made write() fail with EFAULT.
- Fix protocol error "Drag has not ended": change on_fail and the
GLFW_DRAG_DATA_REQUEST error path to call finish_drag_write(i)+return
instead of cancel_drag(), which was calling wl_data_source_destroy()
before the compositor ended the drag, violating the Wayland protocol.
- Fix double-free of dr.pending_data: null the pointer after free and
add cleanup to finish_drag_write().
- Fix missing finish_drag_write() after a full write in data-request
mode, which left the pipe open causing the target to wait for EOF.
X11 (glfw/x11_window.c):
- Wrap XSendEvent() calls in send_xdnd_enter/position/leave/drop with
_glfwGrabErrorHandlerX11()/_glfwReleaseErrorHandlerX11(). A target
window destroyed between discovery and message delivery produced a
BadWindow error that hit the default X11 abort handler. Now handled
gracefully by clearing current_target or cancelling the drag."
Fixes#9677Fixes#9683
When tab_bar_filter is used (e.g. with sessions), move_tab() was using
self.active_tab_idx (index in the full tabs list) as an index into the
filtered tabs list, causing incorrect behavior.
Also fix the same bug in tab_at_location() for left/right locations.
Fixes#9672Fixes#9673
Fixes#9663: visible gray/black bars appear at the left and right
sides of the tab bar when background_opacity is set and the window width
is not a multiple of the cell width.
Three fixes in update_blank_rects:
1. Fix off-by-one: use g.right instead of g.right-1 for the right blank
rect start position. The old code caused a 1-pixel overlap with tab
content and spuriously added a right blank rect even for
perfectly-aligned windows.
2. Fix blank rect colors: only use tab_bar_left/right_edge_color when
tab_bar_margin_width > 0 (explicit configured margin). When
margin_width=0 (default), use default_bg which blends with the window
background instead of showing a solid tab-colored bar.
3. Fix inner margin BOTTOM_EDGE height: use tab_bar.top instead of vh
so the inner margin blank rect covers only the inner margin area.
Fixes#9664
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Apparently when running under XWayland, we cant rely on libinput to
detect highres scroll devices. Sigh. Linux input is such a disaster.
Dunno if this will break something else, hopefully not.
Fixes#9649
ctypes in Python 3.14 is broken on Intel macs. It uses libffi which is
broken on Intel macs without extra security entitlements. At least
com.apple.security.cs.allow-unsigned-executable-memory and possibly
com.apple.security.cs.disable-executable-page-protection
Rather than add these entitlements, we simply do not import ctypes as it
is not actually used on macs anyway.
Fixes#9643
The dock badge set by macos_dock_badge_on_bell is currently only
cleared when the app transitions from inactive to active via
NSApplicationDidBecomeActiveNotification. This means if a bell
occurs while kitty is already the active app (e.g. in a background
tmux pane or non-focused kitty tab), the badge persists until the
user switches away and back.
Clear the badge on any user interaction (keypress or mouse click)
so it is dismissed as soon as the user engages with kitty, regardless
of whether kitty was already active.