microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.85k stars 8.21k forks source link

Multiple Quake Windows can be opened #15037

Open SubsTheTechnomancer opened 1 year ago

SubsTheTechnomancer commented 1 year ago

Windows Terminal version

1.16.10261.0

Windows build number

22000.1696

Other Software

No response

Steps to reproduce

Expected Behavior

The already open quake window should minimize as is normal while using the quake shortcut.

Actual Behavior

A different quake window opens either above the current quake window or on the currently active screen (if using multiple screens).

SubsTheTechnomancer commented 1 year ago

This might be related to #14957. I would have dismissed this as intended behaviour if not for the tip and tricks page provided (https://learn.microsoft.com/en-us/windows/terminal/tips-and-tricks). As an aside, I'm not sure what the intended behaviour is if, for example, you were to re-enter wt -w _quake a second time. Currently it creates a new tab in the existing quake window but I don't see any documentation related to this.

zadjii-msft commented 1 year ago

Do you have both Terminal Preview and Terminal stable installed? Are you possibly running one Terminal instance elevated (as admin)/?

I'd be sure that this isn't #14957 - that's only just been checked in and is only available on internal 1.18 builds.

Doing wt -w _quake a second time perhaps isn't documented the best. That implicitly turns into wt -w _quake new-tab, which essentially turns into "open a new tab in the window named _quake".

SubsTheTechnomancer commented 1 year ago

Are you possibly running one Terminal instance elevated (as admin)/?

By default, my terminal instances are elevated, yes. Is that the reason for this behaviour?

zadjii-msft commented 1 year ago

Probably - though, there should only be one _quake window for the elevated instances, and one single _quake window for the unelevated ones.

Can you check something for me quick/? In each of the open _quake windows, can you open the Command Palette (ctrl+shift+p), then perform the "Toggle focus mode" action? That should make the titlebar (and tabs) of the _quake window visible. Do both windows have a sheild icon in the top left, like so:

image

If they both do, that's very peculiar, and I might want to take a look at your settings.json file next.

If they DON'T both have one, then this is totally by design.

SubsTheTechnomancer commented 1 year ago

I did this, and yeah, the one instantiated by the command is not an elevated terminal, so it does seem to be by design. Unfortunately, then, I'm not sure how I would open an elevated quake window with the command, unless this is already documented.

zadjii-msft commented 1 year ago

Alright I think this is crazy. But here's my thoughts on what's going on

The issue that for some reason, the unelevated terminal instance is still running. Only one process can hold on to the global hotkeys.

The issue is that there's that first unelevated instance that's still running. That would be something to investigate.

SubsTheTechnomancer commented 1 year ago

I believe you may have swapped which instance in elevated and which is not, but I think the problem is still the same, except that it is the elevated instance that is getting priority over the global hotkeys.

cypherfunc commented 11 months ago

related/repeat of #11478?

cypherfunc commented 11 months ago

For reference, none of my quake tabs are elevated