Commit graph

10 commits

Author SHA1 Message Date
Kovid Goyal
d4d75646bd
Drag and drop: Fix dropping a window on a temporarily shown title bar
The title bars shown only for a window drag were hidden before the drop
was classified, which moves the windows, so a drop on a title bar was
treated as a directional insert instead of a swap.

Classify the drop in on_window_drop() before hiding them. On Wayland the
drag source can finish before the drop is delivered, so when the drop is
on kitty, on_drag_source_finished() now leaves hiding them to the drop,
falling back to hiding them if the drop never arrives.

Closes #10709
2026-10-21 06:03:46 +05:30
Kovid Goyal
dfa9c097e2
Cleanup previous PR ensuring stale saved restore tabis not present 2026-09-28 10:40:15 +05:30
白鸽
ab8ef49c02 Restore active tab after same-window tab reordering 2026-09-28 12:55:26 +08:00
白鸽
719849f4fc Fix tab hover switching during tab drags
Window drop previews are cleared before tab drop previews on each tab drag
update. With the shared hover state, this cancels the tab hover timer on every
update, preventing the 0.6 second tab switch.

Preserve a tab hover timer when clearing a window drop preview. Keep the
existing cancellation behavior for window drags and cover the regression.
2026-09-26 19:06:18 +08:00
Kovid Goyal
409fd06cc3
autoformat 2026-09-26 15:51:14 +05:30
Kovid Goyal
d63d7ef643
Drag and drop: Fix issues in tab hover switching and insertion
- Dropping a tab on the tab bar always re-orders. Only windows are merged
  into a tab when dropped on its middle. Single window tabs still switch
  tabs on hover so they can be dropped into the content area.
- Draw the vertical insertion marker in the blank line between tabs so it
  does not hide a tab title, using a single cell only when crowded.
- Make the dropped tab active after a drop from another OS Window, instead
  of whichever tab ended up at the stale active index after re-ordering.
- Dropping the window of a single window tab at an insertion point moves
  its tab, preserving title and layout, and is a no-op next to itself.
- Do not leave an empty tab behind if moving a dropped window fails.
- Highlight the new tab button only when appending.
- Unify the window and tab drag hover state and share the tab bar drop
  hit testing code.
2026-09-26 15:50:52 +05:30
白鸽
6155d085d2 Drag and drop: Switch tabs on hover and preview tab insertion 2026-09-26 14:32:37 +05:30
Kovid Goyal
b0b5c286c5
cleanup previous PR and fix some bugs I doscovered while doing it 2026-09-15 22:04:44 +05:30
白鸽
120cad0cba Fix native tab drop completion and offset hit testing 2026-09-14 20:07:58 +08:00
白鸽
7faf714da2 Allow dropping single-window tabs into another tab layout 2026-09-14 19:17:54 +08:00