Skip to content

Make terminal tab reorder drop handling platform robust#2767

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:feature/terminal-reorder-drop-coordinates
Jun 12, 2026
Merged

Make terminal tab reorder drop handling platform robust#2767
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:feature/terminal-reorder-drop-coordinates

Conversation

@vogella

@vogella vogella commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

The terminal tab reorder added for #2679 did not work on Windows and on Linux Wayland, while it worked on X11. The reorder mapped the drop event coordinates to the tab folder, but those coordinates are not display-relative on every platform (on Wayland they are relative to the shell), so the drop position check rejected every drop on the tab strip. In addition, drops over the tab folder are not necessarily delivered to a drop target registered on its parent.

The drop target is now also registered on the tab folder itself, and when the drop event coordinates do not map onto the tab strip the reorder retries with the cursor location, which uses the same coordinate base as Control.toControl and is what the workbench tab reorder relies on. Verified in a runtime IDE on Wayland; a retest on Windows with the next I-build would be appreciated.

See #2679

The tab reorder introduced for issue eclipse-platform#2679 relied on the drop event
coordinates being display-relative and on drops over the tab folder
being delivered to the page book drop target. Both assumptions do not
hold on every platform: on Wayland the drop event coordinates are
relative to the shell, so every drop on the tab strip was rejected as a
drop on the content area, and on some platforms drops over a child
control never reach the drop target of its parent.

Register the drop target additionally on the tab folder and retry with
the cursor location when the drop event coordinates do not map onto the
tab strip. The cursor location uses the same coordinate base as
Control.toControl and is also what the workbench tab reorder relies on.

See eclipse-platform#2679

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves terminal tab drag-and-drop reordering in TerminalsView to behave consistently across platforms (notably Windows and Linux Wayland) by making drop targeting and coordinate handling more robust.

Changes:

  • Register the drop target on both the page book control and the CTabFolder to ensure drops are received reliably across platforms.
  • When drop event coordinates don’t map onto the tab strip, retry the reorder using the display cursor location (matching Control.toControl(...)’s coordinate base).
  • Factor tab-strip detection into a dedicated isOnTabStrip(Point) helper for clearer intent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nlisker

nlisker commented Jun 12, 2026

Copy link
Copy Markdown

a retest on Windows with the next I-build would be appreciated.

Ping me when it's there.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    54 files  +    53      54 suites  +53   56m 6s ⏱️ + 56m 6s
 4 677 tests + 4 676   4 655 ✅ + 4 654   22 💤 + 22  0 ❌ ±0 
11 925 runs  +11 924  11 772 ✅ +11 771  153 💤 +153  0 ❌ ±0 

Results for commit 3b5a040. ± Comparison against base commit f92c8da.

@vogella vogella merged commit bc1c7f1 into eclipse-platform:master Jun 12, 2026
18 checks passed
@vogella vogella deleted the feature/terminal-reorder-drop-coordinates branch June 12, 2026 12:58
@vogella

vogella commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Give it a try in tomorrows build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants