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 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2631 | 2631 |
2632 if (delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN) { | 2632 if (delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN) { |
2633 DefWindowProcWithRedrawLock(WM_NCLBUTTONDOWN, HTCAPTION, l_param); | 2633 DefWindowProcWithRedrawLock(WM_NCLBUTTONDOWN, HTCAPTION, l_param); |
2634 } else { | 2634 } else { |
2635 DefWindowProc(hwnd(), WM_NCLBUTTONDOWN, HTCAPTION, l_param); | 2635 DefWindowProc(hwnd(), WM_NCLBUTTONDOWN, HTCAPTION, l_param); |
2636 } | 2636 } |
2637 } | 2637 } |
2638 break; | 2638 break; |
2639 } | 2639 } |
2640 | 2640 |
2641 case WM_NCMOUSELEAVE: | 2641 case WM_NCMOUSELEAVE: { |
2642 // If the DWM is rendering the window controls, we need to give the DWM's | |
2643 // default window procedure the chance to repaint the window border icons | |
2644 if (HasSystemFrame()) { | |
sky
2016/08/15 16:17:13
Does the conditional really matter here?
elawrence
2016/08/15 16:31:14
I'm afraid I'm ill-qualified to answer that; I mat
msw
2016/08/15 18:57:35
The issue doesn't seem to repro with non-glass bro
| |
2645 LRESULT result; | |
2646 DwmDefWindowProc(hwnd(), WM_NCMOUSELEAVE, 0, 0, &result); | |
msw
2016/08/15 18:57:35
nit q: I wonder if we should set handled to true f
elawrence
2016/08/16 16:00:49
Done.
| |
2647 } | |
2642 break; | 2648 break; |
2649 } | |
2643 | 2650 |
2644 default: | 2651 default: |
2645 left_button_down_on_caption_ = false; | 2652 left_button_down_on_caption_ = false; |
2646 break; | 2653 break; |
2647 } | 2654 } |
2648 return handled; | 2655 return handled; |
2649 } | 2656 } |
2650 | 2657 |
2651 void HWNDMessageHandler::SetBoundsInternal(const gfx::Rect& bounds_in_pixels, | 2658 void HWNDMessageHandler::SetBoundsInternal(const gfx::Rect& bounds_in_pixels, |
2652 bool force_size_changed) { | 2659 bool force_size_changed) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2691 MONITORINFO monitor_info = {sizeof(monitor_info)}; | 2698 MONITORINFO monitor_info = {sizeof(monitor_info)}; |
2692 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), | 2699 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), |
2693 &monitor_info); | 2700 &monitor_info); |
2694 gfx::Rect shrunk_rect(monitor_info.rcMonitor); | 2701 gfx::Rect shrunk_rect(monitor_info.rcMonitor); |
2695 shrunk_rect.set_height(shrunk_rect.height() - 1); | 2702 shrunk_rect.set_height(shrunk_rect.height() - 1); |
2696 background_fullscreen_hack_ = true; | 2703 background_fullscreen_hack_ = true; |
2697 SetBoundsInternal(shrunk_rect, false); | 2704 SetBoundsInternal(shrunk_rect, false); |
2698 } | 2705 } |
2699 | 2706 |
2700 } // namespace views | 2707 } // namespace views |
OLD | NEW |