From c4734a5083d8c42d13398ca09430b8277aa2b861 Mon Sep 17 00:00:00 2001 From: Jeff Booher Date: Wed, 22 Oct 2014 16:01:22 -0700 Subject: [PATCH] update for surface pro users with auto-hide taskbars --- appshell/cef_dark_aero_window.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appshell/cef_dark_aero_window.cpp b/appshell/cef_dark_aero_window.cpp index a8e83bf2c..5b318e61d 100644 --- a/appshell/cef_dark_aero_window.cpp +++ b/appshell/cef_dark_aero_window.cpp @@ -155,7 +155,10 @@ namespace WindowsTaskBar RECT tbOther; BOOL intersection = ::IntersectRect(&tbOther, &info.rcMonitor, &bar.rc); - return ((dwStyle & WS_EX_TOPMOST) && intersection); + // Short-circuit if there's only 1 monitor and assume it intersects + bool singleMonitor = (::GetSystemMetrics(SM_CMONITORS) == 1); + + return ((dwStyle & WS_EX_TOPMOST) && (singleMonitor || intersection)); } // API