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

right-clicking the tray icon focuses terminal *and* opens menu #10936

Closed
DHowett opened this issue Aug 12, 2021 · 3 comments · Fixed by #10980
Closed

right-clicking the tray icon focuses terminal *and* opens menu #10936

DHowett opened this issue Aug 12, 2021 · 3 comments · Fixed by #10980
Assignees
Labels
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. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@DHowett
Copy link
Member

DHowett commented Aug 12, 2021

Windows Terminal version (or Windows build number)

1.11

Other Software

No response

Steps to reproduce

as in title

Expected Behavior

No response

Actual Behavior

as in title

@DHowett DHowett added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-User Interface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Aug 12, 2021
@DHowett DHowett added this to the Terminal v1.11 milestone Aug 12, 2021
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Aug 12, 2021
@leonMSFT
Copy link
Contributor

Yeah I really wanted to find a workaround even if bodgy around this 😢 -
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-trackpopupmenuex#remarks
image

@DHowett
Copy link
Member Author

DHowett commented Aug 15, 2021

oh no. I wonder how other applications get around it. Have an invisible window "hosting" the tray icon?

@zadjii-msft
Copy link
Member

I guess we should check what PowerToys does. Theirs works the way we want 🤔

@ghost ghost added the In-PR This issue has a related PR label Aug 18, 2021
@ghost ghost closed this as completed in #10980 Aug 20, 2021
@ghost ghost removed the In-PR This issue has a related PR label Aug 20, 2021
ghost pushed a commit that referenced this issue Aug 20, 2021
Currently, the monarch window will show itself when opening the tray icon context menu. This is because a window must be set as the foreground window when the context menu opens, otherwise the menu won't be able to be dismissed when clicking outside of the context menu.

This PR makes the tray icon create a non visible/interactable window for the sole purpose of being set as the foreground window when the tray icon's context menu is opened. Then none of the terminal windows should be set as the foreground window when opening the context menu.

Closes #10936
@ghost ghost added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Aug 20, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants