| 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
|
|
|