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()) |
| 2645 handled = DwmDefWindowProc(hwnd(), WM_NCMOUSELEAVE, 0, 0, NULL) != 0; |
2642 break; | 2646 break; |
| 2647 } |
2643 | 2648 |
2644 default: | 2649 default: |
2645 left_button_down_on_caption_ = false; | 2650 left_button_down_on_caption_ = false; |
2646 break; | 2651 break; |
2647 } | 2652 } |
2648 return handled; | 2653 return handled; |
2649 } | 2654 } |
2650 | 2655 |
2651 void HWNDMessageHandler::SetBoundsInternal(const gfx::Rect& bounds_in_pixels, | 2656 void HWNDMessageHandler::SetBoundsInternal(const gfx::Rect& bounds_in_pixels, |
2652 bool force_size_changed) { | 2657 bool force_size_changed) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2691 MONITORINFO monitor_info = {sizeof(monitor_info)}; | 2696 MONITORINFO monitor_info = {sizeof(monitor_info)}; |
2692 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), | 2697 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), |
2693 &monitor_info); | 2698 &monitor_info); |
2694 gfx::Rect shrunk_rect(monitor_info.rcMonitor); | 2699 gfx::Rect shrunk_rect(monitor_info.rcMonitor); |
2695 shrunk_rect.set_height(shrunk_rect.height() - 1); | 2700 shrunk_rect.set_height(shrunk_rect.height() - 1); |
2696 background_fullscreen_hack_ = true; | 2701 background_fullscreen_hack_ = true; |
2697 SetBoundsInternal(shrunk_rect, false); | 2702 SetBoundsInternal(shrunk_rect, false); |
2698 } | 2703 } |
2699 | 2704 |
2700 } // namespace views | 2705 } // namespace views |
OLD | NEW |