| 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/widget/native_widget_win.h" | 5 #include "ui/views/widget/native_widget_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 WPARAM w_param, | 2015 WPARAM w_param, |
| 2016 LPARAM l_param) { | 2016 LPARAM l_param) { |
| 2017 // Using ScopedRedrawLock here frequently allows content behind this window to | 2017 // Using ScopedRedrawLock here frequently allows content behind this window to |
| 2018 // paint in front of this window, causing glaring rendering artifacts. | 2018 // paint in front of this window, causing glaring rendering artifacts. |
| 2019 // If omitting ScopedRedrawLock here triggers caption rendering artifacts via | 2019 // If omitting ScopedRedrawLock here triggers caption rendering artifacts via |
| 2020 // DefWindowProc message handling, we'll need to find a better solution. | 2020 // DefWindowProc message handling, we'll need to find a better solution. |
| 2021 SetMsgHandled(FALSE); | 2021 SetMsgHandled(FALSE); |
| 2022 return 0; | 2022 return 0; |
| 2023 } | 2023 } |
| 2024 | 2024 |
| 2025 void NativeWidgetWin::OnSetFocus(HWND focused_window) { | 2025 void NativeWidgetWin::OnSetFocus(HWND old_focused_window) { |
| 2026 delegate_->OnNativeFocus(focused_window); | 2026 delegate_->OnNativeFocus(old_focused_window); |
| 2027 InputMethod* input_method = GetWidget()->GetInputMethodDirect(); | 2027 InputMethod* input_method = GetWidget()->GetInputMethodDirect(); |
| 2028 if (input_method) | 2028 if (input_method) |
| 2029 input_method->OnFocus(); | 2029 input_method->OnFocus(); |
| 2030 SetMsgHandled(FALSE); | 2030 SetMsgHandled(FALSE); |
| 2031 } | 2031 } |
| 2032 | 2032 |
| 2033 LRESULT NativeWidgetWin::OnSetText(const wchar_t* text) { | 2033 LRESULT NativeWidgetWin::OnSetText(const wchar_t* text) { |
| 2034 // DefWindowProc for WM_SETTEXT does weird non-client painting, so we need to | 2034 // DefWindowProc for WM_SETTEXT does weird non-client painting, so we need to |
| 2035 // call it inside a ScopedRedrawLock. | 2035 // call it inside a ScopedRedrawLock. |
| 2036 return DefWindowProcWithRedrawLock(WM_SETTEXT, NULL, | 2036 return DefWindowProcWithRedrawLock(WM_SETTEXT, NULL, |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2784 // static | 2784 // static |
| 2785 bool NativeWidgetPrivate::IsTouchDown() { | 2785 bool NativeWidgetPrivate::IsTouchDown() { |
| 2786 // This currently isn't necessary because we're not generating touch events on | 2786 // This currently isn't necessary because we're not generating touch events on |
| 2787 // windows. When we do, this will need to be updated. | 2787 // windows. When we do, this will need to be updated. |
| 2788 return false; | 2788 return false; |
| 2789 } | 2789 } |
| 2790 | 2790 |
| 2791 } // namespace internal | 2791 } // namespace internal |
| 2792 | 2792 |
| 2793 } // namespace views | 2793 } // namespace views |
| OLD | NEW |