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

Unified Diff: views/widget/native_widget_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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_win.cc
===================================================================
--- views/widget/native_widget_win.cc (revision 98834)
+++ views/widget/native_widget_win.cc (working copy)
@@ -39,6 +39,7 @@
#include "views/widget/aero_tooltip_manager.h"
#include "views/widget/child_window_message_processor.h"
#include "views/widget/drop_target_win.h"
+#include "views/widget/monitor_win.h"
#include "views/widget/native_widget_delegate.h"
#include "views/widget/native_widget_views.h"
#include "views/widget/root_view.h"
@@ -285,19 +286,6 @@
return true;
}
-// 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);
-}
-
// Links the HWND to its NativeWidget.
const char* const kNativeWidgetKey = "__VIEWS_NATIVE_WIDGET__";
@@ -1639,9 +1627,9 @@
return 0;
}
}
- if (EdgeHasTopmostAutoHideTaskbar(ABE_LEFT, monitor))
+ if (GetTopmostAutoHideTaskbarForEdge(ABE_LEFT, monitor))
client_rect->left += kAutoHideTaskbarThicknessPx;
- if (EdgeHasTopmostAutoHideTaskbar(ABE_TOP, monitor)) {
+ if (GetTopmostAutoHideTaskbarForEdge(ABE_TOP, monitor)) {
if (GetWidget()->ShouldUseNativeFrame()) {
// Tricky bit. Due to a bug in DwmDefWindowProc()'s handling of
// WM_NCHITTEST, having any nonclient area atop the window causes the
@@ -1657,9 +1645,9 @@
client_rect->top += kAutoHideTaskbarThicknessPx;
}
}
- if (EdgeHasTopmostAutoHideTaskbar(ABE_RIGHT, monitor))
+ if (GetTopmostAutoHideTaskbarForEdge(ABE_RIGHT, monitor))
client_rect->right -= kAutoHideTaskbarThicknessPx;
- if (EdgeHasTopmostAutoHideTaskbar(ABE_BOTTOM, monitor))
+ if (GetTopmostAutoHideTaskbarForEdge(ABE_BOTTOM, monitor))
client_rect->bottom -= kAutoHideTaskbarThicknessPx;
// We cannot return WVR_REDRAW when there is nonclient area, or Windows
« no previous file with comments | « views/widget/monitor_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698