Skip to content
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

Fix a pair of TermControl dragging bugs #10650

Merged
51 commits merged into from
Jul 28, 2021
Merged

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Jul 13, 2021

Summary of the Pull Request

This fixes two bugs related to dragging into the bounds of the TermControl. Although the fixes are fairly small, I'm batching them up, because I don't want to stack 2 more PRs on top of #10051.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

This is kind of annoying that the auto-scrolling is handled by the TermControl, but it uses a timer that's still a WinUI construct.

We only want to start the auto-scrolling behavior when the drag started inside the control. Otherwise, in the tab drag scenario, dragging into the bounds of the TermControl will trick it into thinking it should start a scroll.

  Now we have an InteractivityAutomationPeer, which acts like the implementation for TermControlAutomationPeer.

  TermControlAutomationPeer is still needed though, because it implements FrameworkElementAutomationPeer, which is needed to hook up the AP to the actual UIA tree.

  So we split up the work into two halves, the bit that should be done by the core (the ITextProvider, the IControlAccessibilityInfo), vs the stuff that needs to be in the control (FrameworkElementAutomationPeer). IUiaEventDispatcher should probably be in the control as well, but that's a problem for future us.
…ity-projection-000

# Conflicts:
#	src/cascadia/TerminalControl/ControlInteractivity.cpp
#	src/cascadia/TerminalControl/ControlInteractivity.h
#	src/cascadia/TerminalControl/TermControl.cpp
#	src/cascadia/UnitTests_Control/ControlInteractivityTests.cpp
  Kinda the same thing. Don't modify the selection if the pointer down drag
  didn't even start in the control to begin with.
@ghost ghost added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Jul 13, 2021
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Base automatically changed from dev/migrie/interactivity-projection-000 to main July 19, 2021 16:59
@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Jul 21, 2021
Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

Yeah. Looks good.

@miniksa
Copy link
Member

miniksa commented Jul 22, 2021

Oop. Gotta fix that merge conflict. Assigning Mike.

@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jul 28, 2021
@ghost
Copy link

ghost commented Jul 28, 2021

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 4b45bb8 into main Jul 28, 2021
@ghost ghost deleted the dev/migrie/b/9109-tab-drag-scrolling branch July 28, 2021 22:27
@ghost
Copy link

ghost commented Aug 31, 2021

🎉Windows Terminal Preview v1.11.2421.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Second It's a PR that needs another sign-off Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
3 participants