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

Exclude Quake window from FancyZones #10197

Open
Tracked by #8888
xwillq opened this issue May 26, 2021 · 15 comments
Open
Tracked by #8888

Exclude Quake window from FancyZones #10197

xwillq opened this issue May 26, 2021 · 15 comments
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Area-Windowing Window frame, quake mode, tearout Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Milestone

Comments

@xwillq
Copy link

xwillq commented May 26, 2021

Description of the new feature/enhancement

When I summon quake window while using FancyZones it snaps to the same zone where main terminal window is located.

Started fresh terminal instance:

image

Summoned quake window:

image

To solve this problem I can exclude WindowsTerminal.exe from FancyZones, but this way I won't be able to manage regular terminal windows with FancyZones. It would be better if we could exclude only the quake window, but not the other ones.

Proposed technical implementation details

As I understand, FancyZones uses application executable name for its Exclude rules (might be wrong, tho), thus it could be possible to create a separate executable for quake window, so we could exclude only this one. It's a dirty fix, but it can do the job if there is no other option.

@xwillq xwillq added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label May 26, 2021
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 26, 2021
@zadjii-msft
Copy link
Member

Technically, any terminal window can become the quake window, so it's not going to be a good enough solution to have a different exe for the quake window.

@crutkas any clever ideas here?

@zadjii-msft zadjii-msft added the Product-Terminal The new Windows Terminal. label May 26, 2021
@crutkas
Copy link
Member

crutkas commented May 26, 2021

can we set the window type to maybe like popup or something in quake mode? Pretty sure a WS_POPUP will ignore FZ and what we'll do for PT Run shortly.

@crutkas
Copy link
Member

crutkas commented May 26, 2021

Actually, this may be really interesting to work around since i think they have window remembered

@enricogior may have some ideas

@DHowett
Copy link
Member

DHowett commented May 27, 2021

@crutkas is this something we should move over to your repo? If it turns into a feature request for us to have a specific window style or something, we can bring it back . . . but it doesn't appear to be actionable right now.

@crutkas
Copy link
Member

crutkas commented May 28, 2021

A quake mode terminal can even be window snapped currently. This adjustment should prevent this as well as having FZ snap.

This is work that would need to be done in Terminal. FZ shouldn't need to be customized per-app if at all possible.

@zadjii-msft
Copy link
Member

Okay, sounds like the recommendation is to add WS_POPUP whenever the Terminal is in quake mode. I'm a little worried that does something else to our window style that I don't know about quite yet. We'll need to make sure to test both the IslandWindow and the NonClientIslandWindow with that style to what changes.

@zadjii-msft zadjii-msft added Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Jun 1, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 1, 2021
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Jun 1, 2021
@zadjii-msft zadjii-msft added the Priority-3 A description (P3) label Jun 1, 2021
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jul 7, 2021
@zadjii-msft zadjii-msft self-assigned this Aug 5, 2021
@zadjii-msft

This comment was marked as resolved.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Dec 13, 2021
@neur1n

This comment was marked as resolved.

@KalleOlaviNiemitalo

This comment was marked as resolved.

@zadjii-msft

This comment was marked as resolved.

@zadjii-msft zadjii-msft reopened this Apr 14, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 14, 2022
@zadjii-msft zadjii-msft modified the milestones: Terminal v2.0, Backlog Apr 14, 2022
@zadjii-msft zadjii-msft added the Area-Windowing Window frame, quake mode, tearout label Apr 14, 2022
@zadjii-msft zadjii-msft removed their assignment Apr 14, 2022
@neur1n
Copy link

neur1n commented Apr 14, 2022

I'm using PowerToys 0.57.2 and Windows Terminal Preview 1.13.10.733.0 and this issue still presents.

But a few moments later, the quake mode terminal got out from the zone when I pressed Win+`. Seems like it quakes in and out. The AUTHENTIC quake mode.

@zadjii-msft
Copy link
Member

@LGUG2Z was asking me about this on mastodon and I think this might be a viable solution for https://github.com/LGUG2Z/komorebi too, but I haven't had any chance to investigate what the side effects of WS_POPUP would be

@KalleOlaviNiemitalo
Copy link

FancyZonesWindowUtils::IsCandidateForZoning checks WS_POPUP (via FancyZonesWindowUtils::IsPopupWindow), and other things.

In X11, applications set window properties on their windows to communicate their preferences to the window manager. Perhaps a similar scheme would work here for letting applications explicitly opt in or out of FancyZones, if WS_POPUP can have undesired effects. Windows appears to have two ways to associate properties with a window:

  • Window Properties, where keys are strings or global atoms, and values are HANDLE. So you could have "FancyZonesDisable" as the key and (HANDLE)TRUE as the value.
  • SHGetPropertyStoreForWindow gets an IPropertyStore, in which keys are PROPERTYKEY and values are PROPVARIANT. I don't know whether the keys must be registered in Windows Property System before they can be used here.

@LGUG2Z
Copy link

LGUG2Z commented Apr 28, 2023

I'm not sure about FancyZones, but for the purposes of komorebi (and probably GlazeWM as well), even having a cloned class with a slightly different name applied to the Quake window, or setting the title of whichever window is chosen for Quake mode to something like "Terminal (Quake Mode)" would be more than enough for users to isolate it so that it isn't tiled as a regular window.

@daltongd
Copy link

daltongd commented Nov 6, 2024

I love the Windows Terminal, but it would be great to see any progress with this issue. At the moment I'm using a workaround to be able to recognize the window with komorebi rules. I added this snippet to the $Profile:

function quake {
  $Host.UI.RawUI.WindowTitle = "_quake"
}

And I have to enter the quake command every time I start the quake mode for the first time. It's not very bad, but also not amazing.
Maybe there is a way to distinguish the quake window from other windows from within the $Profile so I could call it programmatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Area-Windowing Window frame, quake mode, tearout Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

8 participants