diff options
-rw-r--r-- | chrome/browser/views/constrained_window_impl.cc | 12 | ||||
-rw-r--r-- | chrome/browser/views/constrained_window_impl.h | 1 | ||||
-rw-r--r-- | chrome/views/custom_frame_window.cc | 36 | ||||
-rw-r--r-- | chrome/views/custom_frame_window.h | 1 | ||||
-rw-r--r-- | chrome/views/widget_win.h | 2 |
5 files changed, 0 insertions, 52 deletions
diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc index 43e6b3a9..ec0b9d2 100644 --- a/chrome/browser/views/constrained_window_impl.cc +++ b/chrome/browser/views/constrained_window_impl.cc @@ -712,18 +712,6 @@ void ConstrainedWindowImpl::OnFinalMessage(HWND window) { WidgetWin::OnFinalMessage(window); } -void ConstrainedWindowImpl::OnGetMinMaxInfo(LPMINMAXINFO mm_info) { - // Override this function to set the maximize area as the client area of the - // containing window. - CRect parent_rect; - ::GetClientRect(GetParent(), &parent_rect); - - mm_info->ptMaxSize.x = parent_rect.Width(); - mm_info->ptMaxSize.y = parent_rect.Height(); - mm_info->ptMaxPosition.x = parent_rect.left; - mm_info->ptMaxPosition.y = parent_rect.top; -} - LRESULT ConstrainedWindowImpl::OnMouseActivate(HWND window, UINT hittest_code, UINT message) { diff --git a/chrome/browser/views/constrained_window_impl.h b/chrome/browser/views/constrained_window_impl.h index f9371fe..836b2a9 100644 --- a/chrome/browser/views/constrained_window_impl.h +++ b/chrome/browser/views/constrained_window_impl.h @@ -54,7 +54,6 @@ class ConstrainedWindowImpl : public ConstrainedWindow, // Windows message handlers: virtual void OnDestroy(); virtual void OnFinalMessage(HWND window); - virtual void OnGetMinMaxInfo(LPMINMAXINFO mm_info); virtual LRESULT OnMouseActivate(HWND window, UINT hittest_code, UINT message); virtual void OnWindowPosChanged(WINDOWPOS* window_pos); diff --git a/chrome/views/custom_frame_window.cc b/chrome/views/custom_frame_window.cc index 015ec0e..baf5b5e 100644 --- a/chrome/views/custom_frame_window.cc +++ b/chrome/views/custom_frame_window.cc @@ -981,42 +981,6 @@ void CustomFrameWindow::SizeWindowToDefault() { /////////////////////////////////////////////////////////////////////////////// // CustomFrameWindow, WidgetWin overrides: -void CustomFrameWindow::OnGetMinMaxInfo(MINMAXINFO* minmax_info) { - // We handle this message so that we can make sure we interact nicely with - // the taskbar on different edges of the screen and auto-hide taskbars. - - HMONITOR primary_monitor = MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY); - MONITORINFO primary_info; - primary_info.cbSize = sizeof(primary_info); - GetMonitorInfo(primary_monitor, &primary_info); - - minmax_info->ptMaxSize.x = - primary_info.rcWork.right - primary_info.rcWork.left; - minmax_info->ptMaxSize.y = - primary_info.rcWork.bottom - primary_info.rcWork.top; - - HMONITOR target_monitor = - MonitorFromWindow(GetHWND(), MONITOR_DEFAULTTONEAREST); - MONITORINFO target_info; - target_info.cbSize = sizeof(target_info); - GetMonitorInfo(target_monitor, &target_info); - - minmax_info->ptMaxPosition.x = - abs(target_info.rcWork.left - target_info.rcMonitor.left); - minmax_info->ptMaxPosition.y = - abs(target_info.rcWork.top - target_info.rcMonitor.top); - - // Work around task bar auto-hiding. By default the window is sized over the - // top of the un-hide strip, so we adjust the size by a single pixel to make - // it work. Because of the way Windows adjusts the target size rect for non - // primary screens (it's quite daft), we only do this for the primary screen, - // which I think should cover at least 95% of use cases. - if ((target_monitor == primary_monitor) && - EqualRect(&target_info.rcWork, &target_info.rcMonitor)) { - --minmax_info->ptMaxSize.y; - } -} - static void EnableMenuItem(HMENU menu, UINT command, bool enabled) { UINT flags = MF_BYCOMMAND | (enabled ? MF_ENABLED : MF_DISABLED | MF_GRAYED); EnableMenuItem(menu, command, flags); diff --git a/chrome/views/custom_frame_window.h b/chrome/views/custom_frame_window.h index 2878f91..73ec4ef3 100644 --- a/chrome/views/custom_frame_window.h +++ b/chrome/views/custom_frame_window.h @@ -48,7 +48,6 @@ class CustomFrameWindow : public Window { virtual void DisableInactiveRendering(bool disable); // Overridden from WidgetWin: - virtual void OnGetMinMaxInfo(MINMAXINFO* minmax_info); virtual void OnInitMenu(HMENU menu); virtual void OnMouseLeave(); virtual LRESULT OnNCActivate(BOOL active); diff --git a/chrome/views/widget_win.h b/chrome/views/widget_win.h index 6b4d606..491d220 100644 --- a/chrome/views/widget_win.h +++ b/chrome/views/widget_win.h @@ -187,7 +187,6 @@ class WidgetWin : public Widget, MSG_WM_ERASEBKGND(OnEraseBkgnd) MSG_WM_ENDSESSION(OnEndSession) MSG_WM_EXITMENULOOP(OnExitMenuLoop) - MSG_WM_GETMINMAXINFO(OnGetMinMaxInfo) MSG_WM_HSCROLL(OnHScroll) MSG_WM_INITMENU(OnInitMenu) MSG_WM_INITMENUPOPUP(OnInitMenuPopup) @@ -359,7 +358,6 @@ class WidgetWin : public Widget, virtual void OnEndSession(BOOL ending, UINT logoff) { SetMsgHandled(FALSE); } virtual void OnExitMenuLoop(BOOL is_track_popup_menu) { SetMsgHandled(FALSE); } virtual LRESULT OnEraseBkgnd(HDC dc); - virtual void OnGetMinMaxInfo(LPMINMAXINFO mm_info) { } virtual LRESULT OnGetObject(UINT uMsg, WPARAM w_param, LPARAM l_param); virtual void OnHScroll(int scroll_type, short position, HWND scrollbar) { SetMsgHandled(FALSE); |