Skip to content

Fix two-pixel gap at the bottom of a maximized Terminal window#20209

Open
reflectronic wants to merge 1 commit into
microsoft:mainfrom
reflectronic:fix-maximized-gap
Open

Fix two-pixel gap at the bottom of a maximized Terminal window#20209
reflectronic wants to merge 1 commit into
microsoft:mainfrom
reflectronic:fix-maximized-gap

Conversation

@reflectronic
Copy link
Copy Markdown

When a window's client area fully covers a monitor, Windows considers it a "fullscreen" window and drops the taskbar's always-on-top status. If Terminal is configured to hide the title bar, maximizing the window causes its client area to fully cover the monitor, triggering this behavior. This prevents the auto-hide taskbar from appearing when the user hovers over the edge of the screen (#1438).

To work around this, Terminal previously shrank the client area by 2 pixels if an auto-hide taskbar was detected. However, this creates a visible gap where the desktop or other applications show through the maximized window.

To fix this correctly, we set the "NonRudeHWND" property on the window, which tells Windows to never treat Terminal as a "fullscreen" window. Of course, when the user enters actual fullscreen mode, we remove this property. This lets us remove the workaround and let Terminal's client area fully cover the monitor when maximized.

Fixes #12959

@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 Product-Terminal The new Windows Terminal. labels May 10, 2026
Copy link
Copy Markdown
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.

this is much smarter. It looks like IslandWindow has support for fullscreen mode as well; should we propagate this change there, or is it not subject to the same issue?

(fwiw: that is the one we use when "show tabs in the titlebar" is turned off)

@DHowett
Copy link
Copy Markdown
Member

DHowett commented May 12, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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. Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

White line at bottom when using "Automatically hide the taskbar"

2 participants