summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 00:33:34 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 00:33:34 +0000
commitfb4797181c6d5d1c724107f6c5ec3d8b95bdeb9a (patch)
treef4705d26c5b278d08471e9010a11c69aa6e6e61e /chrome/views
parent4e6b02f23537a91bd1990900ff0ffb5001d5b74d (diff)
downloadchromium_src-fb4797181c6d5d1c724107f6c5ec3d8b95bdeb9a.zip
chromium_src-fb4797181c6d5d1c724107f6c5ec3d8b95bdeb9a.tar.gz
chromium_src-fb4797181c6d5d1c724107f6c5ec3d8b95bdeb9a.tar.bz2
Rip out custom WM_GETMINMAXINFO handling entirely. I think this is a relic of the old Halo Frame. Trying to rip it out halfway results in problems, like the taskbar not un-auto-hiding when Chromium is maximized.
This should result in correct handling of maximized windows on multiple monitors with different resolutions, taskbar positions, and auto-hide settings (since we're just using the native Windows code to do everything). BUG=943445 Review URL: http://codereview.chromium.org/14446 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r--chrome/views/custom_frame_window.cc36
-rw-r--r--chrome/views/custom_frame_window.h1
-rw-r--r--chrome/views/widget_win.h2
3 files changed, 0 insertions, 39 deletions
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);