diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-25 22:11:49 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-25 22:11:49 +0000 |
commit | 65bd67d12cbbf73a0c7842750bd30639ddad2306 (patch) | |
tree | c498514b6a1a3d3e50b62498a09fd642cb9aa139 /chrome/views/custom_frame_window.cc | |
parent | c62b56cde3acdd5d16896795739d7ce894c6e1a7 (diff) | |
download | chromium_src-65bd67d12cbbf73a0c7842750bd30639ddad2306.zip chromium_src-65bd67d12cbbf73a0c7842750bd30639ddad2306.tar.gz chromium_src-65bd67d12cbbf73a0c7842750bd30639ddad2306.tar.bz2 |
Make the AeroGlassFrame better:
- client edge rendering is now pixel-perfect for all BrowserTypes.
- fix NCCALCSIZE handling that was making our top-right corner less than perfectly round
- make system menu work
- remove some unnecessary functions
B=1031854
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1340 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/custom_frame_window.cc')
-rw-r--r-- | chrome/views/custom_frame_window.cc | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/chrome/views/custom_frame_window.cc b/chrome/views/custom_frame_window.cc index 24e6200..1842953 100644 --- a/chrome/views/custom_frame_window.cc +++ b/chrome/views/custom_frame_window.cc @@ -826,11 +826,6 @@ CustomFrameWindow::CustomFrameWindow(WindowDelegate* window_delegate, CustomFrameWindow::~CustomFrameWindow() { } -void CustomFrameWindow::ExecuteSystemMenuCommand(int command) { - if (command) - SendMessage(GetHWND(), WM_SYSCOMMAND, command, 0); -} - /////////////////////////////////////////////////////////////////////////////// // CustomFrameWindow, Window overrides: @@ -1083,14 +1078,6 @@ void CustomFrameWindow::OnNCPaint(HRGN rgn) { ReleaseDC(GetHWND(), dc); } -void CustomFrameWindow::OnNCRButtonDown(UINT flags, const CPoint& point) { - if (flags == HTCAPTION || flags == HTSYSMENU) { - RunSystemMenu(point); - } else { - SetMsgHandled(FALSE); - } -} - void CustomFrameWindow::OnNCLButtonDown(UINT ht_component, const CPoint& point) { switch (ht_component) { @@ -1121,11 +1108,10 @@ void CustomFrameWindow::OnNCLButtonDown(UINT ht_component, SetMsgHandled(TRUE); return; } - case HTSYSMENU: - RunSystemMenu(non_client_view_->GetSystemMenuPoint()); + default: + Window::OnNCLButtonDown(ht_component, point); break; } - SetMsgHandled(FALSE); } LRESULT CustomFrameWindow::OnSetCursor(HWND window, UINT hittest_code, @@ -1168,19 +1154,6 @@ void CustomFrameWindow::OnSize(UINT param, const CSize& size) { /////////////////////////////////////////////////////////////////////////////// // CustomFrameWindow, private: -void CustomFrameWindow::RunSystemMenu(const CPoint& point) { - // We need to reset and clean up any currently created system menu objects. - // We need to call this otherwise there's a small chance that we aren't going - // to get a system menu. We also can't take the return value of this - // function. We need to call it *again* to get a valid HMENU. - ::GetSystemMenu(GetHWND(), TRUE); - HMENU system_menu = ::GetSystemMenu(GetHWND(), FALSE); - int id = ::TrackPopupMenu(system_menu, - TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, - point.x, point.y, 0, GetHWND(), NULL); - ExecuteSystemMenuCommand(id); -} - // static void CustomFrameWindow::InitClass() { static bool initialized = false; |