Index: views/widget/monitor_win.cc |
=================================================================== |
--- views/widget/monitor_win.cc (revision 98344) |
+++ 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(); |
} |
+HWND GetTopmostAutoHideTaskbarForEdge(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)); |
+ if (::IsWindow(taskbar) && (monitor != NULL) && |
jennb
2011/08/26 20:41:57
If we always return null unless monitor is set, sh
jianli
2011/08/26 22:18:52
Done.
|
+ (MonitorFromWindow(taskbar, MONITOR_DEFAULTTONULL) == monitor) && |
+ (GetWindowLong(taskbar, GWL_EXSTYLE) & WS_EX_TOPMOST)) |
+ return taskbar; |
+ return NULL; |
+} |
+ |
} // namespace views |