73 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
077f402bee Implement source_actions for X11 and cocoa DnD backends
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/91dbd1d2-ae9d-4816-b710-7d6f3147cda6

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-14 05:46:21 +00:00
copilot-swe-agent[bot]
9b9bfeb02d Fix XI_BadDevice crash on USB device disconnect (#9723)
When a USB HID device (keyboard/mouse) is disconnected, X11 fires an
XI_HierarchyChanged event, which triggers read_xi_scroll_devices().
That function calls XIGetProperty() on devices from XIQueryDevice().
There is a race condition: if a device is removed between these calls,
X11 generates an XI_BadDevice error. Without a custom error handler, the
default X11 handler calls exit(), killing kitty.

Fix: wrap the device query loop in read_xi_scroll_devices() with
_glfwGrabErrorHandlerX11() / _glfwReleaseErrorHandlerX11() so that any
XI_BadDevice error is captured by kitty's own handler rather than the
default fatal one.

Fixes #9723
Fixes #9724
2026-03-22 07:52:49 +05:30
copilot-swe-agent[bot]
36be8be951 Fix massive scroll on focus return by resetting X11 scroll valuators on focus loss
When kitty loses focus and the user scrolls in another
application, X11 XI scroll valuators accumulate position values. When the
user returns to kitty and scrolls, delta (value - v->value) uses the stale
pre-focus-loss value, causing a massive unexpected scroll jump.

Fix: reset scroll valuators (mark them uninitialized) on FocusOut so the
first scroll event after focus is regained sets the baseline without firing
a scroll event.

Fixes #9703
Fixes #9707
2026-03-19 15:31:22 +05:30
Kovid Goyal
c0b549fee8 Make XI2 scroll offset type detection more robust
Since we have to use heuristics, lets at least collect stats for a few
events before deciding.
2026-03-12 21:44:20 +05:30
copilot-swe-agent[bot]
0dfb01e8c5 Implement X11 drag source backend for the new API
Fixes #9522
2026-02-18 16:55:52 +05:30
Kovid Goyal
34ffc6cdce X11: port drop code to new API 2026-02-09 07:54:40 +05:30
copilot-swe-agent[bot]
fac4420804 Simplify new drag/drop API
Fixes #9466
2026-02-03 22:02:51 +05:30
copilot-swe-agent[bot]
fa6c76d3e3 Add a GLFW API to support starting drag operations
Fixes #9454
Fixes #9455
2026-02-02 20:49:00 +05:30
Kovid Goyal
0d0ee5474d Cleanup previous PR 2026-01-15 19:26:27 +05:30
copilot-swe-agent[bot]
6436cda482 Add is_finger_based field to XIScrollDevice with detection logic
Fixes #9385
2026-01-15 19:18:27 +05:30
Kovid Goyal
da170555fa Ignore master pointer device events since we use the slave devices 2026-01-11 12:57:56 +05:30
copilot-swe-agent[bot]
bfc21fc7a4 X11: handle XI device hotplugging
Fixes #9370
2026-01-10 09:00:37 +05:30
Kovid Goyal
813c560e29 Implement proper scroll event type detection in X11
Uses libinput scroll mode property to detect high res devices.
2026-01-10 08:38:45 +05:30
Kovid Goyal
15206eda0b Add XIGetQuery 2026-01-10 06:17:53 +05:30
Kovid Goyal
f8426d529c ... 2026-01-10 05:51:59 +05:30
copilot-swe-agent[bot]
c1a54a0cc0 Add XI2 smooth scrolling support for X11 backend
Fixes #9369
2026-01-09 17:13:24 +05:30
Kovid Goyal
43be32a3d7 More atoms 2025-05-02 12:20:54 +05:30
Kovid Goyal
11cb3adb8f Reduce roundtrips to X server to fetch atom values 2025-05-02 09:28:24 +05:30
Kovid Goyal
f04fc251bf Start work on full panel support in X11 2025-05-01 15:44:08 +05:30
Kovid Goyal
50f64d5981 Only use window occlusion on platforms where it is supported 2025-02-12 12:02:46 +05:30
Kovid Goyal
b0ebd340fe Function to get the current system color theme 2024-11-07 12:47:06 +05:30
Kovid Goyal
191ccf2d54 Wire up color scheme change notifications on X11 as well 2024-08-11 22:20:39 +05:30
Kovid Goyal
1bffe89b5d Wayland GNOME: titlebar color now follows system theme
When GNOME system theme is default, the color matches the background
color. When it is dark it is dark.
2024-04-04 21:52:56 +05:30
Kovid Goyal
7c6d40fa0c Implement background blur for KDE on X11 as well 2023-06-27 14:56:35 +05:30
Kovid Goyal
66801b6b28 GLFW API to track system color scheme dark/light
Implemented only on macOS and Wayland.
2023-04-13 13:16:33 +05:30
Kovid Goyal
98eacb2067 panel kitten: Do not depend on xprop 2022-09-24 15:44:54 +05:30
Kovid Goyal
2cef9abbd3 Get rid of one call to xprop in the panel kitten 2022-09-24 15:17:11 +05:30
Kovid Goyal
7e1380cc0d Start work on giving GLFW a proper clipboard API 2022-09-08 12:45:34 +05:30
Luflosi
785973bb5e GLFW: Make joystick platform code init on demand
From upstream: 782e6b6cef.
2020-07-23 23:56:30 +02:00
Luflosi
78efefcea1 Revert "Linux: Fix slow startup on some systems caused by GLFW searching for joysticks. Since kitty does not use joysticks, disable joystick support."
This reverts commit ab960ea12d.
2020-07-23 23:56:21 +02:00
Luflosi
d0c6ce9fd7 GLFW: Add support for mouse input transparency
From upstream: d285a9fdeb.
2020-07-16 22:25:12 +02:00
Luflosi
767da68239 Reduce difference to GLFW upstream
Only whitespace, formatting and comments were changed. This does not alter any functionality.
2020-06-02 11:45:08 +02:00
Luflosi
3b745b82db X11: Clarify function name and comment
From upstream: 5f9dfe3d83.
2020-05-23 11:34:17 +02:00
Kovid Goyal
9da5bee178 X11: Filter out Xlib errors from other connections
2c8e0512dd
2020-05-01 14:59:16 +05:30
Kovid Goyal
2458c3a7c6 Implement drag and drop of text/plain for Wayland as well 2020-03-19 13:28:21 +05:30
Kovid Goyal
e827e6fa21 X11: Allow drag and drop of text/plain in addition to text/uri-list
Fixes #2441
2020-03-18 22:37:23 +05:30
Kovid Goyal
e142083d53 Remove unused code
Strip out the GLFW timer code, since we use our own kitty based
monotonic clock.
2019-12-19 16:27:25 +05:30
Kovid Goyal
61a77e19ef X11: Fix content scale fallback value on KDE
From upstream: 75294462b3
2019-10-31 09:10:01 +05:30
Kovid Goyal
0d68b7078c Check for float conversion issues on build
Useful to catch any errors left over from the migration of times from
double to int64_t
2019-09-27 19:47:25 +05:30
Luflosi
28bb123be8 Update the GLFW version number from 3.3 to 3.4
Closes https://github.com/kovidgoyal/kitty/issues/1884.
From a337c56848.
2019-08-02 11:00:16 -05:00
Luflosi
489f3e6c9d Add C dialect reminders to each glfw source file
Reduces the difference to upstream.
From 56aad76b16.
2019-07-20 21:07:27 -05:00
Luflosi
bdc4558a43 Update GLFW copyright years
Reduces the difference to upstream.
From ab118b2529.
2019-07-20 00:30:13 -05:00
Kovid Goyal
0fb1481038 Move event loop wakeup code into backend_utils 2019-07-05 09:34:51 +05:30
Kovid Goyal
841c907efc Build glfw with all warnings enabled 2019-07-01 10:42:07 +05:30
Kovid Goyal
2ef0391b08 Convert some declarations to C99 style
From upstream: 0c6b505619
2019-07-01 08:32:47 +05:30
Kovid Goyal
3cd1fef4cb X11: Clean up EWMH feature detection
From upstream: fad9896d38
2019-07-01 05:57:17 +05:30
Luflosi
bada795320 Reduce the difference of glfw/x11_* to glfw upstream
This only changes some formatting, whitespace, etc.. There are no
changes to the functionality.
Let me know if you don't like some of those changes.
2019-06-11 17:57:39 +02:00
Kovid Goyal
47acc9ff2f Get rid of GLFW_(TRUE|FALSE) 2019-06-08 08:14:30 +05:30
Kovid Goyal
fe62700825 Get rid of GLFWbool 2019-06-08 08:12:42 +05:30
Kovid Goyal
41318d763b Fix missing context APIs in version strings 2019-04-09 10:06:10 +05:30