Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: ui/views/win/hwnd_message_handler.cc

Issue 2244263002: Ensure window border icons repaint when DWM is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 22:03:50 no {}
elawrence 2016/08/16 16:00:49 Done.
2645 handled = DwmDefWindowProc(hwnd(), WM_NCMOUSELEAVE, 0, 0, NULL) != 0;
2646 }
2642 break; 2647 break;
2648 }
2643 2649
2644 default: 2650 default:
2645 left_button_down_on_caption_ = false; 2651 left_button_down_on_caption_ = false;
2646 break; 2652 break;
2647 } 2653 }
2648 return handled; 2654 return handled;
2649 } 2655 }
2650 2656
2651 void HWNDMessageHandler::SetBoundsInternal(const gfx::Rect& bounds_in_pixels, 2657 void HWNDMessageHandler::SetBoundsInternal(const gfx::Rect& bounds_in_pixels,
2652 bool force_size_changed) { 2658 bool force_size_changed) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2691 MONITORINFO monitor_info = {sizeof(monitor_info)}; 2697 MONITORINFO monitor_info = {sizeof(monitor_info)};
2692 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), 2698 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY),
2693 &monitor_info); 2699 &monitor_info);
2694 gfx::Rect shrunk_rect(monitor_info.rcMonitor); 2700 gfx::Rect shrunk_rect(monitor_info.rcMonitor);
2695 shrunk_rect.set_height(shrunk_rect.height() - 1); 2701 shrunk_rect.set_height(shrunk_rect.height() - 1);
2696 background_fullscreen_hack_ = true; 2702 background_fullscreen_hack_ = true;
2697 SetBoundsInternal(shrunk_rect, false); 2703 SetBoundsInternal(shrunk_rect, false);
2698 } 2704 }
2699 2705
2700 } // namespace views 2706 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698