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

Restore from minimized properly when "auto-hide taskbar" is enabled #5213

Merged
2 commits merged into from
Apr 1, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ int NonClientIslandWindow::_GetResizeHandleHeight() const noexcept
// GH#1438 - Attempt to detect if there's an autohide taskbar, and if there
// is, reduce our size a bit on the side with the taskbar, so the user can
// still mouse-over the taskbar to reveal it.
HMONITOR hMon = MonitorFromWindow(_window.get(), MONITOR_DEFAULTTONULL);
// GH#5209 - make sure to use MONITOR_DEFAULTTONEAREST, so that this will
// still find the right monitor even when we're restoring from minimized.
HMONITOR hMon = MonitorFromWindow(_window.get(), MONITOR_DEFAULTTONEAREST);
if (hMon && (_isMaximized || _fullscreen))
{
MONITORINFO monInfo{ 0 };
Expand Down