-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple "Active Terminal" and "Focused Control" #3540
Merged
zadjii-msft
merged 15 commits into
master
from
dev/migrie/f/1205-active-vs-focused-ready-FIGHT
Nov 18, 2019
Merged
Decouple "Active Terminal" and "Focused Control" #3540
zadjii-msft
merged 15 commits into
master
from
dev/migrie/f/1205-active-vs-focused-ready-FIGHT
Nov 18, 2019
Conversation
This file contains 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
If I want to double up and also fix #522 (which I do), then I need to also * when a tab GetsFocus, send the focus instead to the Pane * When the border is clicked on, focus that pane's control And like a lot of cleanup, because this is horrifying
If the border is `Transparent`, then it can't hittest for Tapped events, and it'll fall through (to someone) THis at least works, but looks garish
zadjii-msft
added
Area-UserInterface
Issues pertaining to the user interface of the Console or Terminal
Product-Terminal
The new Windows Terminal.
labels
Nov 12, 2019
carlos-zamora
approved these changes
Nov 12, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d like to understand a couple things:
- Should the event in Tab also be an event?
- why is the event lambda in
Tab::SplitPane
different from the one inAttachPaneEventHandlers
(sic)? Why is one attached in Split and the other attached in a helper?
|
DHowett-MSFT
approved these changes
Nov 18, 2019
3 tasks
🎉 Handy links: |
This was referenced Nov 26, 2019
zadjii-msft
deleted the
dev/migrie/f/1205-active-vs-focused-ready-FIGHT
branch
January 31, 2020 14:23
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-UserInterface
Issues pertaining to the user interface of the Console or Terminal
Needs-Second
It's a PR that needs another sign-off
Product-Terminal
The new Windows Terminal.
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.
Summary of the Pull Request
Unties the concept of "focused control" from "active control".
Previously, we were exclusively using the "Focused" state of
TermControl
s to determine which one was active. This was fraught with gotchas - if anything else became focused, then suddenly there was no pane focused in the Tab. This happened especially frequently if the user clicked on a tab to focus the window. Furthermore, in experimental branches with more UI added to the Terminal (such as dev/migrie/f/2046-command-palette), when these UIs were added to the Terminal, they'd take focus, which again meant that there was no focused pane.This fixes these issue by having each Tab manually track which Pane is active in that tab. The Tab is now the arbiter of who in the tree is "active". Panes still track this state, for them to be able to MoveFocus appropriately.
It also contains a related fix to prevent the tab separator from stealing focus from the TermControl. This required us to set the color of the un-focused Pane border to some color other that Transparent, so I went with the TabViewBackground. Panes now look like the following:
References
See also: #2046
PR Checklist
Validation Steps Performed
Tested manually opening panes, closing panes, clicking around panes, the whole dance.