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

Commit 7988c34

Browse files
committed
Merge pull request #479 from adobe/jeff/surface-pro-taskbar-fix
Add a fix for Surface Pro users who auto hide their taskbar
2 parents dc6e67e + c4734a5 commit 7988c34

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)