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

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

Issue 1826703002: Fix a painting bug which occurred due to the change which reduces the size of the fullscreen chrome… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | « ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ('k') | 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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), 1053 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY),
1054 &monitor_info); 1054 &monitor_info);
1055 gfx::Rect shrunk_rect(monitor_info.rcMonitor); 1055 gfx::Rect shrunk_rect(monitor_info.rcMonitor);
1056 shrunk_rect.set_height(shrunk_rect.height() - 1); 1056 shrunk_rect.set_height(shrunk_rect.height() - 1);
1057 background_fullscreen_hack_ = true; 1057 background_fullscreen_hack_ = true;
1058 SetBoundsInternal(shrunk_rect, false); 1058 SetBoundsInternal(shrunk_rect, false);
1059 } 1059 }
1060 } else if (background_fullscreen_hack_) { 1060 } else if (background_fullscreen_hack_) {
1061 // Restore the bounds of the window to fullscreen. 1061 // Restore the bounds of the window to fullscreen.
1062 DCHECK(fullscreen_handler_->fullscreen()); 1062 DCHECK(fullscreen_handler_->fullscreen());
1063 background_fullscreen_hack_ = false;
1064 MONITORINFO monitor_info = {sizeof(monitor_info)}; 1063 MONITORINFO monitor_info = {sizeof(monitor_info)};
1065 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), 1064 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY),
1066 &monitor_info); 1065 &monitor_info);
1067 SetBoundsInternal(gfx::Rect(monitor_info.rcMonitor), false); 1066 SetBoundsInternal(gfx::Rect(monitor_info.rcMonitor), false);
1067 background_fullscreen_hack_ = false;
1068 } 1068 }
1069 } 1069 }
1070 1070
1071 void HWNDMessageHandler::RestoreEnabledIfNecessary() { 1071 void HWNDMessageHandler::RestoreEnabledIfNecessary() {
1072 if (delegate_->IsModal() && !restored_enabled_) { 1072 if (delegate_->IsModal() && !restored_enabled_) {
1073 restored_enabled_ = true; 1073 restored_enabled_ = true;
1074 // If we were run modally, we need to undo the disabled-ness we inflicted on 1074 // If we were run modally, we need to undo the disabled-ness we inflicted on
1075 // the owner's parent hierarchy. 1075 // the owner's parent hierarchy.
1076 HWND start = ::GetWindow(hwnd(), GW_OWNER); 1076 HWND start = ::GetWindow(hwnd(), GW_OWNER);
1077 while (start) { 1077 while (start) {
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after
2648 delegate_->HandleClientSizeChanged(GetClientAreaBounds().size()); 2648 delegate_->HandleClientSizeChanged(GetClientAreaBounds().size());
2649 ResetWindowRegion(false, true); 2649 ResetWindowRegion(false, true);
2650 } 2650 }
2651 2651
2652 if (direct_manipulation_helper_) 2652 if (direct_manipulation_helper_)
2653 direct_manipulation_helper_->SetBounds(bounds_in_pixels); 2653 direct_manipulation_helper_->SetBounds(bounds_in_pixels);
2654 } 2654 }
2655 2655
2656 2656
2657 } // namespace views 2657 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698