Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/win/hwnd_message_handler.h" | 5 #include "ui/views/win/hwnd_message_handler.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <oleacc.h> | 8 #include <oleacc.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #include <tchar.h> | 10 #include <tchar.h> |
| (...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1812 RDW_NOCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW); | 1812 RDW_NOCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW); |
| 1813 EnumChildWindows(hwnd(), EnumChildWindowsForRedraw, NULL); | 1813 EnumChildWindows(hwnd(), EnumChildWindowsForRedraw, NULL); |
| 1814 } | 1814 } |
| 1815 | 1815 |
| 1816 // The frame may need to redraw as a result of the activation change. | 1816 // The frame may need to redraw as a result of the activation change. |
| 1817 // We can get WM_NCACTIVATE before we're actually visible. If we're not | 1817 // We can get WM_NCACTIVATE before we're actually visible. If we're not |
| 1818 // visible, no need to paint. | 1818 // visible, no need to paint. |
| 1819 if (IsVisible()) | 1819 if (IsVisible()) |
| 1820 delegate_->SchedulePaint(); | 1820 delegate_->SchedulePaint(); |
| 1821 | 1821 |
| 1822 if (delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN) { | 1822 if (!delegate_->HasFrame() || |
| 1823 (delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN)) { | |
|
Bret
2017/05/24 22:22:05
nit: you don't need parens around this clause
| |
| 1823 SetMsgHandled(TRUE); | 1824 SetMsgHandled(TRUE); |
| 1824 return TRUE; | 1825 return TRUE; |
| 1825 } | 1826 } |
| 1826 | 1827 |
| 1827 return DefWindowProcWithRedrawLock( | 1828 return DefWindowProcWithRedrawLock( |
| 1828 WM_NCACTIVATE, render_as_active || active, 0); | 1829 WM_NCACTIVATE, render_as_active || active, 0); |
| 1829 } | 1830 } |
| 1830 | 1831 |
| 1831 LRESULT HWNDMessageHandler::OnNCCalcSize(BOOL mode, LPARAM l_param) { | 1832 LRESULT HWNDMessageHandler::OnNCCalcSize(BOOL mode, LPARAM l_param) { |
| 1832 // We only override the default handling if we need to specify a custom | 1833 // We only override the default handling if we need to specify a custom |
| (...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2909 MONITORINFO monitor_info = {sizeof(monitor_info)}; | 2910 MONITORINFO monitor_info = {sizeof(monitor_info)}; |
| 2910 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), | 2911 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), |
| 2911 &monitor_info); | 2912 &monitor_info); |
| 2912 gfx::Rect shrunk_rect(monitor_info.rcMonitor); | 2913 gfx::Rect shrunk_rect(monitor_info.rcMonitor); |
| 2913 shrunk_rect.set_height(shrunk_rect.height() - 1); | 2914 shrunk_rect.set_height(shrunk_rect.height() - 1); |
| 2914 background_fullscreen_hack_ = true; | 2915 background_fullscreen_hack_ = true; |
| 2915 SetBoundsInternal(shrunk_rect, false); | 2916 SetBoundsInternal(shrunk_rect, false); |
| 2916 } | 2917 } |
| 2917 | 2918 |
| 2918 } // namespace views | 2919 } // namespace views |
| OLD | NEW |