-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Add support for focus mode #6804
Conversation
…ess<->Fullscreen still
…rless in either mode. Now double check NCIW...
… an acceptable known issue, since the alternative is having a white line on top of the window when it loses focus
…ll-just-do-it-myself # Conflicts: # src/cascadia/TerminalApp/ActionAndArgs.cpp # src/cascadia/TerminalApp/AppActionHandlers.cpp # src/cascadia/TerminalApp/ShortcutActionDispatch.cpp # src/cascadia/TerminalApp/ShortcutActionDispatch.h # src/cascadia/TerminalApp/ShortcutActionDispatch.idl # src/cascadia/TerminalApp/TerminalPage.cpp # src/cascadia/TerminalApp/TerminalPage.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handful of things I saw browsing through.
I know someone's going to whine that this isn't "truly" borderless because we're still going to have the 1px border around the window. It's more of frameless or chrome-less. It feels like a giant pain to change it all over, but now's probably the time to consider that before the setting is set.
(I know we briefly mentioned it in the sync meeting today, but I'm still worried about the "border" terminology.)
// - <none> | ||
void NonClientIslandWindow::_SetIsBorderless(const bool borderlessEnabled) | ||
{ | ||
_borderless = borderlessEnabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be testing on the way in that the state is actually changing before dispatching the window messages? Is there a way to set borderless = true on top of an already borderless window and dispatch a bunch of window messages that will make things jump around but end up back where they were in a weird way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really have anything to add here. Really just everything Michael said. I guess I'll approve with suggestions? 🤷♂️
He's right. I think borderless and I think of how a few games appear that support the borderless mode (or game mods that enable the functionality). I doubt MUX is used (probably something in the DWRITE layer) so not sure how it's handled but might be worth investigating if we can get a truly borderless window. Otherwise I'd agree that calling it "chromeless" or "frameless" (preference) would be a better description. Here's something that may help: https://stackoverflow.com/questions/43818022/borderless-window-with-drop-shadow Just ignore the GDI since this can still be mostly done using DirectX: https://docs.microsoft.com/en-us/windows/win32/direct3d12/directx-12-programming-guide |
This comment has been minimized.
This comment has been minimized.
I would actually prefer completely borderless, usually there are some perf bonuses when switching between applications though not sure if that would be the case here. I do agree we'd need resizing and drop shadows. Any way we could do it in |
It would be infinitely harder to do it in the DX layer. The DX layer is fully encapsulated in the We used to do the whole |
In that case, I'd say for now we just call it frameless mode and file a follow on to to get full borderless with resize and shadows still working (and throw a "Help Wanted" label on it). |
I’m not sure the use case for actual borderless mode really exists. It sounds like a strawman. :) This one feels to me like a floating or detached mode. I’d rather we name it by what it accomplishes rather than how it accomplishes it... |
@zadjii-msft Don't forget to update the docs and link the PR! |
So, pursuant to |
Guh, I was supposed to revert that before pushing 🤦♂️ |
This reverts commit 610c267.
I hope one day we can enable that setting without losing resize and drop shadows. |
We're definitely doing the mode with the resizing and the drop shadows. I mistakenly didn't revert the commit where I was playing around with the "frameless" version. |
We shouldn't have to work around that setting. It's a reasonable expectation that functionality won't drop simply due to enabling the setting. Glad we could work around it though. |
I filed an feature request so we can more easily set borderless mode with the xaml setting. That would hopefully replace much of what's here with a simpler, more elegant solution. |
Wait what are you talking about? The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing to NAK so github logs it
For the default key binding, what do we think about |
With the command palette, I'm not sure we need a default key binding right now. We can see if one grows organically! |
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
O M G this is awsome 💯 |
Summary of the Pull Request
Add support for "focus" mode, which only displays the actual terminal content, no tabs or titlebar. The edges of the window are draggable to resize, but the window can't be moved in borderless mode.
The window looks slightly different bewteen different values for
showTabsInTitlebar
, because switching between theNonClientIslandWindow
and theIslandWindow
is hard.showTabsInTitlebar
true
false
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed