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

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

Issue 2007513004: Fix a regression caused by the background fullscreen handling code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 tme.dwHoverTime = 0; 1105 tme.dwHoverTime = 0;
1106 TrackMouseEvent(&tme); 1106 TrackMouseEvent(&tme);
1107 } else if (mouse_tracking_flags != active_mouse_tracking_flags_) { 1107 } else if (mouse_tracking_flags != active_mouse_tracking_flags_) {
1108 TrackMouseEvents(active_mouse_tracking_flags_ | TME_CANCEL); 1108 TrackMouseEvents(active_mouse_tracking_flags_ | TME_CANCEL);
1109 TrackMouseEvents(mouse_tracking_flags); 1109 TrackMouseEvents(mouse_tracking_flags);
1110 } 1110 }
1111 } 1111 }
1112 1112
1113 void HWNDMessageHandler::ClientAreaSizeChanged() { 1113 void HWNDMessageHandler::ClientAreaSizeChanged() {
1114 // Ignore size changes due to fullscreen windows losing activation. 1114 // Ignore size changes due to fullscreen windows losing activation.
1115 if (background_fullscreen_hack_) 1115 if (background_fullscreen_hack_ && !sent_window_size_changing_)
1116 return; 1116 return;
1117 gfx::Size s = GetClientAreaBounds().size(); 1117 gfx::Size s = GetClientAreaBounds().size();
1118 delegate_->HandleClientSizeChanged(s); 1118 delegate_->HandleClientSizeChanged(s);
1119 } 1119 }
1120 1120
1121 bool HWNDMessageHandler::GetClientAreaInsets(gfx::Insets* insets) const { 1121 bool HWNDMessageHandler::GetClientAreaInsets(gfx::Insets* insets) const {
1122 if (delegate_->GetClientAreaInsets(insets)) 1122 if (delegate_->GetClientAreaInsets(insets))
1123 return true; 1123 return true;
1124 DCHECK(insets->IsEmpty()); 1124 DCHECK(insets->IsEmpty());
1125 1125
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2738 MONITORINFO monitor_info = {sizeof(monitor_info)}; 2738 MONITORINFO monitor_info = {sizeof(monitor_info)};
2739 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), 2739 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY),
2740 &monitor_info); 2740 &monitor_info);
2741 gfx::Rect shrunk_rect(monitor_info.rcMonitor); 2741 gfx::Rect shrunk_rect(monitor_info.rcMonitor);
2742 shrunk_rect.set_height(shrunk_rect.height() - 1); 2742 shrunk_rect.set_height(shrunk_rect.height() - 1);
2743 background_fullscreen_hack_ = true; 2743 background_fullscreen_hack_ = true;
2744 SetBoundsInternal(shrunk_rect, false); 2744 SetBoundsInternal(shrunk_rect, false);
2745 } 2745 }
2746 2746
2747 } // namespace views 2747 } // 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