Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Unified Diff: views/widget/monitor_win.cc

Issue 7646003: Support auto-hide taskbar for panels on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/monitor_win.h ('k') | views/widget/native_widget_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « views/widget/monitor_win.h ('k') | views/widget/native_widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698