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 mouse events in the wpf control #4720

Merged
merged 6 commits into from
Feb 28, 2020
Merged

Conversation

ZoeyR
Copy link
Contributor

@ZoeyR ZoeyR commented Feb 25, 2020

Summary of the Pull Request

PR #4548 inadvertantly broke mouse button input in the WPF control. This happened due to the extra layer of HWND indirection. The fix is to move the mouse button handling down into the native control where the window messages are now being sent.

References

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place:

Validation Steps Performed

VS was patched with new bits to ensure correct behavior.

@DHowett-MSFT
Copy link
Contributor

I'm surprised the child HWND isn't getting those events, actually. It's not terribly different from a window hosting a button as a child (where the button is just another HWND, ala standard win32/user32.)... I'd be concerned about pursuing a solution based on us not being able to figure out why mouse events aren't going in when keyboard events definitely are.

@ZoeyR
Copy link
Contributor Author

ZoeyR commented Feb 25, 2020

The child HWND does get the events. The problem was that we were processing these events in the HwndHost which only gets events for the parent HWND

@ZoeyR ZoeyR force-pushed the dev/zorio/fix-wpf-mouse-events branch 2 times, most recently from 70b9f05 to b883028 Compare February 26, 2020 17:56
@zadjii-msft zadjii-msft added the Area-WPFControl Things related to the WPF version of the TermControl label Feb 27, 2020
@ZoeyR ZoeyR force-pushed the dev/zorio/fix-wpf-mouse-events branch from b883028 to a7fd75a Compare February 28, 2020 19:47
src/cascadia/PublicTerminalCore/HwndTerminal.cpp Outdated Show resolved Hide resolved
src/cascadia/PublicTerminalCore/HwndTerminal.cpp Outdated Show resolved Hide resolved
@ZoeyR ZoeyR merged commit 4393fef into master Feb 28, 2020
DHowett-MSFT pushed a commit that referenced this pull request Feb 28, 2020
PR #4548 inadvertantly broke mouse button input in the WPF control. This happened due to the extra layer of HWND indirection. The fix is to move the mouse button handling down into the native control where the window messages are now being sent.

(cherry picked from commit 4393fef)
@DHowett-MSFT DHowett-MSFT deleted the dev/zorio/fix-wpf-mouse-events branch May 5, 2020 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-WPFControl Things related to the WPF version of the TermControl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants