Make terminal tab reorder drop handling platform robust#2767
Merged
vogella merged 1 commit intoJun 12, 2026
Merged
Conversation
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
There was a problem hiding this comment.
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
CTabFolderto 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.
Ping me when it's there. |
Contributor
Contributor
Author
|
Give it a try in tomorrows build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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