Index: views/widget/monitor_win.cc |
=================================================================== |
--- views/widget/monitor_win.cc (revision 98834) |
+++ 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,14 @@ |
return gfx::Rect(); |
} |
+HWND GetTopmostAutoHideTaskbarForEdge(UINT edge, HMONITOR monitor) { |
+ APPBARDATA taskbar_data = { sizeof APPBARDATA, NULL, 0, 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)) ? |
+ taskbar : NULL; |
+} |
+ |
} // namespace views |