Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit c4734a5

Browse files
committed
update for surface pro users with auto-hide taskbars
1 parent 59a44cb commit c4734a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

appshell/cef_dark_aero_window.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ namespace WindowsTaskBar
155155
RECT tbOther;
156156
BOOL intersection = ::IntersectRect(&tbOther, &info.rcMonitor, &bar.rc);
157157

158-
return ((dwStyle & WS_EX_TOPMOST) && intersection);
158+
// Short-circuit if there's only 1 monitor and assume it intersects
159+
bool singleMonitor = (::GetSystemMetrics(SM_CMONITORS) == 1);
160+
161+
return ((dwStyle & WS_EX_TOPMOST) && (singleMonitor || intersection));
159162
}
160163

161164
// API

0 commit comments

Comments
 (0)