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

Pass foreground rights to the emperor #18325

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Dec 13, 2024

Forgetti di spaghetti in #18215.

Closes #18324

Validation Steps Performed

  • Launch through the start menu
  • Explicitly minimize
  • Then...
    • Launch through the start menu again ✅
    • Launch via wtd.exe in Win+R ✅
    • Launch via wtd.exe in another Terminal ✅
    • Launch via handoff ✅

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Windowing Window frame, quake mode, tearout Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. labels Dec 13, 2024
@lhecker
Copy link
Member Author

lhecker commented Dec 13, 2024

(Very annoying issue in the current Canary, so I'm hoping for a quick merge today.)

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

Oooh does it work?

@lhecker
Copy link
Member Author

lhecker commented Dec 13, 2024

At least my 2 test cases do work: Minimizing WT explicitly and then either launch from the start menu or via the explorer context menu.

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

ggez

@DHowett
Copy link
Member

DHowett commented Dec 13, 2024

Mind testing wtd.exe (since it uses CreateProcess!) and handoff?

One thing to note - and this may explain why we have never had good luck testing these things - is that when a debugger is attached a process gets some special "allowed to take foreground" permissions.

So make sure you test with no debugger!

@lhecker
Copy link
Member Author

lhecker commented Dec 13, 2024

Everything's tested, PR description is updated.

@lhecker lhecker merged commit 5006045 into main Dec 13, 2024
20 checks passed
@lhecker lhecker deleted the dev/lhecker/dethronement-fixup branch December 13, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New window instances do not gain foreground rights
3 participants