Window border not present after restoring from maximised fullscreen #14452

Closed
opened 2026-01-31 04:10:46 +00:00 by claunia · 7 comments
Owner

Originally created by @ghost on GitHub (Jul 10, 2021).

Windows Terminal version (or Windows build number)

1.8.1521.0

Other Software

Also effects Command Prompt and Powershell at the time of writing this (Windows 10.0.22000.0).

Steps to reproduce

  1. Open terminal
  2. Maximise terminal window (Win+Up)
  3. Enter fullscreen (F11)
  4. Restore terminal window (Win+Down)

Expected Behavior

The terminal window should restore with a border.

Although it could be argued that the window should return to its maximised state, as this behaviour is used by windows explorer.

Capture1

Actual Behavior

The terminal window restores to its previous location and size, however it does not have a border.

Capture
Originally created by @ghost on GitHub (Jul 10, 2021). ### Windows Terminal version (or Windows build number) 1.8.1521.0 ### Other Software Also effects Command Prompt and Powershell at the time of writing this (Windows 10.0.22000.0). ### Steps to reproduce 1. Open terminal 2. Maximise terminal window (Win+Up) 3. Enter fullscreen (F11) 4. Restore terminal window (Win+Down) ### Expected Behavior The terminal window should restore with a border. Although it could be argued that the window should return to its maximised state, as this behaviour is used by windows explorer. <img width="892" alt="Capture1" src="https://user-images.githubusercontent.com/34384005/125160342-43824980-e174-11eb-8d3c-abb29eac5ba1.PNG"> ### Actual Behavior The terminal window restores to its previous location and size, however it does not have a border. <img width="903" alt="Capture" src="https://user-images.githubusercontent.com/34384005/125160366-5ac13700-e174-11eb-9b73-f41ab7efbc88.PNG">
Author
Owner

@zadjii-msft commented on GitHub (Jul 12, 2021):

Holy crap why does this repro with conhost 😨 That's really really unexpected. I'd imagine that win+down shouldn't work at all from fullscreen, or if it does, it should at least toggle off the "fullscreen" window styles.

Out of curiosity, do you know if this repro'd in Windows 10? I wouldn't be surprised if this was a Win11 regression, but I'd be equally unsurprised if this was just always how the console worked.

@zadjii-msft commented on GitHub (Jul 12, 2021): Holy crap why does this repro with conhost 😨 That's really really unexpected. I'd imagine that <kbd>win+down</kbd> shouldn't work at all from _fullscreen_, or if it does, it should at least toggle off the "fullscreen" window styles. Out of curiosity, do you know if this repro'd in Windows 10? I wouldn't be surprised if this was a Win11 regression, but I'd be equally unsurprised if this was just always how the console worked.
Author
Owner

@ghost commented on GitHub (Jul 12, 2021):

I first saw the issue a few years ago in Windows 10 with cmd, and initially reported it via the feedback hub, but I don't think it ever got picked up.

Out of curiosity I re-enabled my insider account to test the issue on Windows 11 and it was still present.

Then, I tested it on terminal, and it was also effected.

@ghost commented on GitHub (Jul 12, 2021): I first saw the issue a few years ago in Windows 10 with cmd, and initially reported it via the feedback hub, but I don't think it ever got picked up. Out of curiosity I re-enabled my insider account to test the issue on Windows 11 and it was still present. Then, I tested it on terminal, and it was also effected.
Author
Owner

@zadjii-msft commented on GitHub (Jul 12, 2021):

initially reported it via the feedback hub, but I don't think it ever got picked up.

Yea, feedback hub is a bit of a black hole sometimes. At least if it did repro in Windows 10, then I don't need to go chase down the DWM team to figure out how it regressed. Now we just need to fix our code 😅

@zadjii-msft commented on GitHub (Jul 12, 2021): > initially reported it via the feedback hub, but I don't think it ever got picked up. Yea, feedback hub is a bit of a black hole sometimes. At least if it did repro in Windows 10, then I don't need to go chase down the DWM team to figure out how it regressed. Now we just need to fix our code 😅
Author
Owner

@ghost commented on GitHub (Jul 12, 2021):

I attempted to find a solution myself, but was unsuccessful.

From what I found, win+down invokes onResize however onResize doesn't know the previous fullscreen state.

This means that if we were to check the value of _fullscreen in onResize, it would be true when entering fullscreen as well as when win+down is pressed (as we never actually exit fullscreen), so we cannot use the value of _fullscreen as a test.

I thought maybe onRestore may be invoked but that is only when transitioning from a minimized state.

This is my first time looking at the terminal source, so I'm probably looking in the wrong places 😄. I look forward to seeing the solution 😄.

@ghost commented on GitHub (Jul 12, 2021): I attempted to find a solution myself, but was unsuccessful. From what I found, `win+down` invokes `onResize` however `onResize` doesn't know the previous fullscreen state. This means that if we were to check the value of `_fullscreen` in `onResize`, it would be `true` when entering fullscreen as well as when `win+down` is pressed (as we never *actually* exit fullscreen), so we cannot use the value of `_fullscreen` as a test. I thought maybe `onRestore` may be invoked but that is only when transitioning from a minimized state. This is my first time looking at the terminal source, so I'm probably looking in the wrong places :smile:. I look forward to seeing the solution :smile:.
Author
Owner

@serd2011 commented on GitHub (Oct 27, 2021):

Not entirely sure but i think conhost and terminal do not have a common bug but rather two separate.

conhost handles fullscreen with
6d091f37b3/src/interactivity/win32/window.hpp (L45-L47)

And terminal handled with 6d091f37b3/src/cascadia/TerminalApp/TerminalPage.h (L81) and
6d091f37b3/src/cascadia/WindowsTerminal/IslandWindow.h (L38)

@serd2011 commented on GitHub (Oct 27, 2021): Not entirely sure but i think conhost and terminal do not have a common bug but rather two separate. conhost handles fullscreen with https://github.com/microsoft/terminal/blob/6d091f37b3cf21955cbdbd70ca988ea1dd0ec143/src/interactivity/win32/window.hpp#L45-L47 And terminal handled with https://github.com/microsoft/terminal/blob/6d091f37b3cf21955cbdbd70ca988ea1dd0ec143/src/cascadia/TerminalApp/TerminalPage.h#L81 and https://github.com/microsoft/terminal/blob/6d091f37b3cf21955cbdbd70ca988ea1dd0ec143/src/cascadia/WindowsTerminal/IslandWindow.h#L38
Author
Owner

@ghost commented on GitHub (Dec 14, 2021):

:tada:This issue was addressed in #11653, which has now been successfully released as Windows Terminal Preview v1.12.3472.0.🎉

Handy links:

@ghost commented on GitHub (Dec 14, 2021): :tada:This issue was addressed in #11653, which has now been successfully released as `Windows Terminal Preview v1.12.3472.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.12.3472.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Dec 14, 2021):

:tada:This issue was addressed in #11653, which has now been successfully released as Windows Terminal v1.11.3471.0.🎉

Handy links:

@ghost commented on GitHub (Dec 14, 2021): :tada:This issue was addressed in #11653, which has now been successfully released as `Windows Terminal v1.11.3471.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.11.3471.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14452