Commit Graph

202 Commits

Author SHA1 Message Date
Kovid Goyal
3ab89a2fa8 Refactor the drop protocol
Get rid of request_id. Instead use the x, y, and Y fields to
disambiguate requests. Specify error handling a little more robustly.

Implementation needed.
2026-04-09 20:39:54 +05:30
Kovid Goyal
71fcc7e233 Add a request id for DnD protocol data requests
Allows multiple in-flight requests. Needs implementation.
2026-04-09 08:23:33 +05:30
Kovid Goyal
c88adfba98 Allow optionally dragging URLs with the mouse
Fixes #9804
2026-04-06 10:40:11 +05:30
copilot-swe-agent[bot]
973c5fb650 Implement OSC 9;4 progress bar rendering in kitty window
Fixes #9777
Fixes #9786
2026-03-31 22:45:25 +05:30
Kovid Goyal
9e79d3be9c Merge branch 'feat-draggable-window-title-bars' of https://github.com/mcrmck/kitty 2026-03-28 10:02:14 +05:30
mc36
a7e5b949a6 adding mouse action line_from_begin see #9755 2026-03-27 08:21:30 +01:00
Kovid Goyal
5ad55ec936 Implement drop data transmission 2026-03-21 08:41:47 +05:30
Kovid Goyal
3a30c47942 Get drop status updates working 2026-03-21 08:41:47 +05:30
Kovid Goyal
b0e57b4dce Send drop move events to child 2026-03-21 08:41:46 +05:30
Kovid Goyal
5a8132d241 Start and stop accepting drops 2026-03-21 08:41:46 +05:30
Kovid Goyal
2898324047 Start work on DnD protocol 2026-03-21 08:41:46 +05:30
mcrmck
2c81a69aad Add drag-and-drop quadrant preview overlay
During a window title-bar drag, render a semi-transparent tint over
the destination window to preview the drop outcome:

- Full-window tint (quadrant=5) when hovering any window in swap-based
  layouts (Tall, Stack, Fat, etc.) or over a title bar — swap is the
  result so the whole window is highlighted.
- Half-window directional tint (quadrant 1-4) when hovering in the
  Splits layout — a real directional insert happens so only the target
  half is highlighted.
- 150ms fade-in; clears immediately on drop or drag exit.

Implementation follows the visual_bell TINT_PROGRAM infrastructure:
two new Screen fields (start_drag_overlay_at, drag_overlay_quadrant),
draw_drag_preview_overlay() in shaders.c called from draw_cells() after
both render paths, set_window_drag_overlay() C→Python bridge in state.c,
and the same child-monitor.c needs_render + set_maximum_wait hooks that
visual_bell uses to keep frames firing during animation.

Layout detection uses hasattr(layout, 'insert_window_next_to') — the
same guard _insert_window_in_direction uses internally — so the overlay
always matches the actual drop behavior.
2026-03-18 00:30:37 -04:00
Kovid Goyal
823214575b Use an unsigned int rather than a double to store pixel scroll offset
Its an integral number of pixels.
2026-02-15 19:09:15 +05:30
Kovid Goyal
66a9963fe9 Shell integration: Allow sending click events to shells using y co-ordinates relative to prompts
Note that I havent actually tested the implementation, I leave that to
@okapia.

Fixes #9500
2026-02-15 10:12:22 +05:30
Kovid Goyal
30ba15e6bc Fix first history line not being redered during pixel scroll 2026-01-08 20:04:27 +05:30
Kovid Goyal
683b59c876 Rely on compiler to produce 0 or 1 only for boolean expressions 2026-01-08 19:49:40 +05:30
Kovid Goyal
e442890523 More duplicated functions 2026-01-08 19:43:25 +05:30
Kovid Goyal
3c6050f4c3 Implement pixel scrolling for the scrollbar as well 2026-01-08 19:22:32 +05:30
Kovid Goyal
dbef4ddd2e We dont need blank_line since it's only used to clear GPU data we can just memset the GPU to 0 directly 2026-01-08 11:23:26 +05:30
Kovid Goyal
da45f7eeaa Clenaup previous PR
Make pixel scrolling the default. Fix memory leak where blank line was
not being deallocated in Screen destructor.
2026-01-08 11:01:34 +05:30
Delice0
818065a050 Add configurable pixel scrolling 2025-12-26 19:33:21 +01:00
Kovid Goyal
3944a41c00 Add support for xterms report OS window size escape code 2025-11-24 11:12:27 +05:30
Kovid Goyal
1faf786bd2 Remove parse error forsystemd's useless OSC 3008 context protocol
It's spamming the test logs. Just ignore it silently
2025-11-11 09:42:42 +05:30
Kovid Goyal
ab6fec104a Add support for the paste events protocol
Fixes #9183
2025-11-04 15:02:19 +05:30
Kovid Goyal
470068d92f Handle two parameter form of modifyOtherKeys 2025-09-29 14:14:38 +05:30
Aleksey Smolenchuk
65a4d89282 Interactive scrollbar implementation 2025-09-08 11:33:15 -07:00
Kovid Goyal
c18018cbad Use DynamicColor to store extra cursor colors 2025-08-26 18:56:31 +05:30
Kovid Goyal
da641982e2 Start work on specifying a color for extra cursors 2025-08-26 18:56:31 +05:30
Kovid Goyal
14741b1b29 Implement rendering of blinking text
Fixes #8551
2025-08-25 13:55:23 +05:30
Kovid Goyal
c393c1679e Implement rendering of multi cursors in the shaders 2025-08-24 20:14:15 +05:30
Kovid Goyal
8f5dc42a61 Parser for multi cursor escape code 2025-08-24 20:14:14 +05:30
Kovid Goyal
e6c1597834 Start work on multiple hardware cursors 2025-08-24 20:14:14 +05:30
Kovid Goyal
a0b58ef205 Dont allow CUB to move cursor onto previous line
Reserve this behavior for actual backspace. Fixes #8900
2025-08-14 21:49:36 +05:30
Kovid Goyal
d52f2e7981 Rewrite rendering pipeline
This was needed to fix various corner cases when doing blending of colors
in linear space. The new architecture has the same performance as the
old in the common case of opaque rendering with no UI layers or images.

In the case of only positive z-index images there is a performance
decrease as the OS Window is now rendered to a offscreen texture and
then blitted to screen. However, in the future when we move to Vulkan or
I can figure out how to get Wayland to accept buffers with colors in
linear space, this performance penalty can be removed. The performance
penalty was not significant on my system but this is highly GPU
dependent. Modern GPUs are supposedly optimised for rendering to
offscreen buffers, so we will see. The awrit project might be a good
test case.

Now either we have 1-shot rendering for the case of opaque with only ext
or all the various pieces are rendered in successive draw calls into an
offscreen buffer that is blitted to the output buffer after all drawing
is done.

Fixes #8869
2025-08-11 00:47:02 +05:30
Kovid Goyal
45b2678db1 Allow backspace to wrap cursor to previous line
Fixes #8841
2025-07-23 08:56:54 +05:30
Kovid Goyal
540e030f96 Start work on handling multicell escape code 2025-02-03 10:56:43 +05:30
Kovid Goyal
643e534053 Do not call monotonic() when changing cursor position
monotonic() is extremely slow. This call was halving the CSI parsing
speed benchmark. Instead we use the time at which parsing of the current
input chunk was started. This should be within a few microseconds and
accurate enough for the cursor trail for which it is used.
2025-01-17 21:41:02 +05:30
Kovid Goyal
0ecbc2b786 Only log an error about modifyOtherKeys if the application attempts to turn it on without first turning on the kitty keyboard protocol 2025-01-16 20:30:09 +05:30
Kovid Goyal
dd9d8353df Support notifying applications on color scheme change 2024-12-20 09:55:49 +05:30
Kovid Goyal
cabd6c0589 Initial port of code to use TextCache 2024-11-04 09:10:07 +05:30
Kovid Goyal
5a2440eb97 Make the TextCache object available in the Screen, LineBuf and Line objects 2024-11-04 09:10:07 +05:30
Kovid Goyal
05120061cc Move various data types into their own headers 2024-11-04 09:10:07 +05:30
Rick Choi
fe63c6ddfd last rendered cursor_bg color and re-use it when trail rendering 2024-10-19 18:16:26 +09:00
Jesse Weaver
b8f28d7a10 Add special flag to shell integration protocol to request real click events 2024-09-06 00:08:55 -06:00
Kovid Goyal
deff40df8a New OSC 21 protocol for color control
Needs to be specced up
2024-07-22 10:57:13 +05:30
Kovid Goyal
06b5eff6e6 Add support for in-band window resize notifications
Fixes #7642
2024-07-18 20:32:33 +05:30
Kovid Goyal
f4fe015261 Support a special key mode for moving cursor at marked prompts
Needed for fish integration because the arrow keys cause auto-complete
to trigger.
2024-03-31 11:19:35 +05:30
Kovid Goyal
4caf8a6b14 Restore support for alternate character sets
Needed by the execrable ncurses. Adds an extra branch in the hot path,
sigh. Thanks to branch prediction it doesnt have any measurable impact
on the benchmark, thankfully.
2024-02-25 09:57:44 +05:30
Kovid Goyal
f45cd87488 Implement paused rendering for graphics 2024-02-25 09:57:33 +05:30
Kovid Goyal
e50447c840 Fix cursor rendering during rendering pause 2024-02-25 09:57:33 +05:30