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

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 767443002: Ensure Surface size always matches window size on swap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index f35b155db25513a71dfb8c5e8835bf652f049fe0..3f04bd6ad72c9c012fea0e1879c045bc771a472a 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -2286,8 +2286,15 @@ void HWNDMessageHandler::OnWindowPosChanging(WINDOWPOS* window_pos) {
}
}
- if (DidClientAreaSizeChange(window_pos))
+ RECT window_rect;
+ gfx::Size old_size;
+ if (GetWindowRect(hwnd(), &window_rect))
+ old_size = gfx::Rect(window_rect).size();
+ gfx::Size new_size = gfx::Size(window_pos->cx, window_pos->cy);
+ if ((old_size != new_size && !(window_pos->flags & SWP_NOSIZE)) ||
+ window_pos->flags & SWP_FRAMECHANGED) {
delegate_->HandleWindowSizeChanging();
+ }
if (ScopedFullscreenVisibility::IsHiddenForFullscreen(hwnd())) {
// Prevent the window from being made visible if we've been asked to do so.
« 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