Commit Graph

17935 Commits

Author SHA1 Message Date
Kovid Goyal
eda9fb58a4 Change the error code for responses used in drag offer protocol to E from R so that there is no ambiguity with drop responses 2026-04-09 22:04:20 +05:30
Kovid Goyal
9196cc51dd Remove unused function 2026-04-09 21:40:29 +05:30
Kovid Goyal
1e714d2c31 Merge branch 'copilot/implement-drag-drop-refactor' of https://github.com/kovidgoyal/kitty 2026-04-09 21:39:18 +05:30
copilot-swe-agent[bot]
3a8253e747 Address code review: add buffer overflow safety in drop_append_request_keys
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/cdeecb3c-8589-4622-8f6b-21b724e4d5fd

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-09 15:41:12 +00:00
copilot-swe-agent[bot]
0f47a23c36 Update DnD tests for new protocol: use x/y/Y disambiguation instead of request_id
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/cdeecb3c-8589-4622-8f6b-21b724e4d5fd

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-09 15:35:23 +00:00
copilot-swe-agent[bot]
c42d8baaad Implement DnD protocol refactoring: remove request_id, merge t=s/t=d into t=r, use x/y/Y for disambiguation
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/cdeecb3c-8589-4622-8f6b-21b724e4d5fd

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-09 15:26:36 +00:00
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
019158c168 Merge branch 'copilot/update-dnd-protocol-symlink-handling' of https://github.com/kovidgoyal/kitty 2026-04-09 18:29:03 +05:30
copilot-swe-agent[bot]
4d2b63fce8 Revert to 1-based directory entry indexing in DnD protocol
- dnd.c: entry_num==0 closes handle; entry_num>=1 reads at entry_num-1
- parse-dnd-command.h: revert cell_y default to 0 (from {0} init)
- gen/apc_parsers.py: remove post_init for DnD parser
- docs/dnd-protocol.rst: update to say 1-based indexing
- tests: all .index() calls add +1, rename test_dir_entry_one_based_index

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/d4074aba-3aeb-4d2b-adc1-d6c6f2b539e7

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-09 11:52:31 +00:00
copilot-swe-agent[bot]
7e0e3eb6ac Fix os.makedirs to os.mkdir for single-level directory in test
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/d09883e5-f460-471d-9dcf-e64e7b96882f

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-09 11:38:49 +00:00
copilot-swe-agent[bot]
d548afc94a Implement DnD protocol changes for symlinks and directory handling
- Remove unique identifier (device:inode) from directory listings
- Change directory entry indexing from 1-based to 0-based
- Add symlink handling in directories: respond with t=r:X=1 and target
- Update parser to default cell_y to -1 for close handle detection
- Update and extend tests for all new behaviors

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/d09883e5-f460-471d-9dcf-e64e7b96882f

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-09 11:33:43 +00:00
Kovid Goyal
a92b381dc3 Change how directories and symlinks in directories are handled when reading drop data
Needs implementation.
2026-04-09 16:47:03 +05:30
Kovid Goyal
79706520c5 Bump openssl for CVEs 2026-04-09 15:01:32 +05:30
Kovid Goyal
543bb5d330 Cleanup previous PR 2026-04-09 14:20:46 +05:30
Kovid Goyal
139a0fac25 Merge branch 'fix-inactive-text-alpha' of https://github.com/zzhaolei/kitty 2026-04-09 14:09:43 +05:30
Petar Dobrev
a4170d4b59 Added macos_fullscreen_ignore_safe_area_insets option 2026-04-09 10:27:01 +03:00
zhaolei
40c2012eeb Support negative inactive_text_alpha values for active-window-only fading 2026-04-09 13:04:01 +08:00
Kovid Goyal
f87f15bd1d ... 2026-04-09 09:19:21 +05:30
Kovid Goyal
bf677042d4 Cleanup previous PR 2026-04-09 09:07:01 +05:30
Kovid Goyal
66e41b8d36 Merge branch 'copilot/add-fifo-queue-for-drop-data' of https://github.com/kovidgoyal/kitty 2026-04-09 09:05:51 +05:30
Kovid Goyal
1923184cba ... 2026-04-09 09:02:26 +05:30
copilot-swe-agent[bot]
f5dd86d32b Address code review: handle malloc failure with ENOMEM, extract drop_finish_and_clear_queue helper
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/3a4975c2-8691-486b-8ff9-f8a2146b8756

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-09 03:25:45 +00:00
copilot-swe-agent[bot]
4339deb647 Add comprehensive tests for request queue and request_id behavior
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/3a4975c2-8691-486b-8ff9-f8a2146b8756

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-09 03:20:41 +00:00
copilot-swe-agent[bot]
f42d07e7ac Add request queue for drop data requests with FIFO ordering and request_id support
Implements a queue of up to 128 in-flight data requests in dnd.c.
All response headers include r=request_id when non-zero.
Queue overflow returns EMFILE and ends the drop.

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/3a4975c2-8691-486b-8ff9-f8a2146b8756

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-09 03:14:33 +00:00
Kovid Goyal
7bb73a3c54 ... 2026-04-09 08:27:13 +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
70e4e9310c ... 2026-04-09 08:00:37 +05:30
Kovid Goyal
0684c13898 Code to get and use machine id during DnD 2026-04-09 07:47:57 +05:30
Kovid Goyal
c08409a981 Function to get machine ID on cocoa 2026-04-09 07:04:12 +05:30
Kovid Goyal
47b5b2ea65 Prevent reading uri-list items for a drag and drop in same window 2026-04-09 06:38:58 +05:30
Kovid Goyal
6c35b64356 ... 2026-04-08 22:57:04 +05:30
Kovid Goyal
cec0e99582 Merge branch 'copilot/fix-issue-9834-add-tests-screen' of https://github.com/kovidgoyal/kitty
Fixes #9834
2026-04-08 22:56:16 +05:30
copilot-swe-agent[bot]
f6f1cae3b7 Fix issue #9834: preserve trailing spaces on soft-wrapped lines during copy
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/343539f7-deab-4eeb-9829-99bec57c3523

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 17:17:20 +00:00
Kovid Goyal
2ee1b85147 Merge branch 'copilot/add-drag-tests-for-dnd-protocol' of https://github.com/kovidgoyal/kitty 2026-04-08 21:29:53 +05:30
copilot-swe-agent[bot]
9cd8558cfd Address code review feedback: improve test names and docstrings
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/f9868553-29a2-48c4-85c2-b6b8f686dccc

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 15:47:31 +00:00
copilot-swe-agent[bot]
7d33569c1a Add comprehensive drag protocol tests and fix double-free bug in drag_free_built_data
- Add 37 new tests covering the drag source side of the DND protocol
- Test drag offer registration/unregistration (t=o, t=O)
- Test drag MIME type offering with various operations (copy/move/both)
- Test pre-sent data for valid/invalid indices, chunked data, multiple MIMEs
- Test image thumbnails: valid RGBA/RGB, invalid formats, dimensions, chunking
- Test drag start failures (no window, no offer, image size mismatches)
- Test drag cancellation from client (t=E:y=-1)
- Test offer replacement, cleanup, and error propagation
- Test client_id propagation for drag operations
- Test resource cleanup on window close during drag build
- Fix double-free in drag_free_built_data: set ds.items=NULL after free
- Add drag_free_offer to destroy_fake_window_contents for proper cleanup

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/f9868553-29a2-48c4-85c2-b6b8f686dccc

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 15:43:37 +00:00
Kovid Goyal
3fb748e3db Add cancelling of current drag offer 2026-04-08 20:49:10 +05:30
Kovid Goyal
87381e1c2d Merge branch 'copilot/implement-drag-drop-protocol' of https://github.com/kovidgoyal/kitty 2026-04-08 20:43:11 +05:30
copilot-swe-agent[bot]
78a9727268 Use pread() for streaming reads, notify on each chunk, fix end-of-data condition
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/3da92580-278b-43dc-9b75-5449fee3024f

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 14:44:30 +00:00
copilot-swe-agent[bot]
de53069c2f Address code review: handle empty file case, use EIO for tmpfile open failure
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/39fe0e9c-1286-442c-8d7d-7cea5905a178

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 14:24:17 +00:00
copilot-swe-agent[bot]
054ea80e00 Implement drag source data functions: drag_free_data, drag_get_data, drag_process_item_data
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/39fe0e9c-1286-442c-8d7d-7cea5905a178

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 14:21:21 +00:00
Kovid Goyal
85b13ce941 Fix compiler warnings 2026-04-08 19:43:58 +05:30
Kovid Goyal
78dfc1f940 Forgot to close drag data fd 2026-04-08 19:36:02 +05:30
Kovid Goyal
f6be9b657c ... 2026-04-08 19:33:32 +05:30
Kovid Goyal
f8d3d17b40 ... 2026-04-08 19:31:40 +05:30
Kovid Goyal
702f9905d2 More work on the DnD protocol 2026-04-08 19:19:20 +05:30
Kovid Goyal
348151c457 More work on DnD protocol 2026-04-08 19:07:15 +05:30
Kovid Goyal
390ae2efac Deny window drag start if drag gesture is not active 2026-04-08 11:57:28 +05:30
Kovid Goyal
3b018528d4 Bump go version for vulnerabilities in stdlib 2026-04-08 11:41:35 +05:30
Kovid Goyal
3f60cec587 Update changelog 2026-04-08 11:38:25 +05:30