| Index: views/widget/monitor_win.cc
|
| ===================================================================
|
| --- views/widget/monitor_win.cc (revision 96619)
|
| +++ views/widget/monitor_win.cc (working copy)
|
| @@ -4,7 +4,7 @@
|
|
|
| #include "views/widget/monitor_win.h"
|
|
|
| -#include <windows.h>
|
| +#include <shellapi.h>
|
|
|
| #include "base/logging.h"
|
| #include "ui/gfx/rect.h"
|
| @@ -24,4 +24,17 @@
|
| return gfx::Rect();
|
| }
|
|
|
| +// Returns true if edge |edge| (one of ABE_LEFT, TOP, RIGHT, or BOTTOM) of
|
| +// monitor |monitor| has an auto-hiding taskbar that's always-on-top.
|
| +bool EdgeHasTopmostAutoHideTaskbar(UINT edge, HMONITOR monitor) {
|
| + APPBARDATA taskbar_data = { 0 };
|
| + taskbar_data.cbSize = sizeof APPBARDATA;
|
| + taskbar_data.uEdge = edge;
|
| + HWND taskbar = reinterpret_cast<HWND>(SHAppBarMessage(ABM_GETAUTOHIDEBAR,
|
| + &taskbar_data));
|
| + return ::IsWindow(taskbar) && (monitor != NULL) &&
|
| + (MonitorFromWindow(taskbar, MONITOR_DEFAULTTONULL) == monitor) &&
|
| + (GetWindowLong(taskbar, GWL_EXSTYLE) & WS_EX_TOPMOST);
|
| +}
|
| +
|
| } // namespace views
|
|
|