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

Unified Diff: ui/platform_window/win/win_window.cc

Issue 1707233002: Reduce the fullscreen window height by 1px on activation loss. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert changes to widget_unittest.cc Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/platform_window/win/win_window.cc
diff --git a/ui/platform_window/win/win_window.cc b/ui/platform_window/win/win_window.cc
index 802f2d79a21c3e060e19732bf930666268385075..1282b091308eba83b07fdd61f51480ec6d5142a8 100644
--- a/ui/platform_window/win/win_window.cc
+++ b/ui/platform_window/win/win_window.cc
@@ -74,9 +74,11 @@ void WinWindow::SetBounds(const gfx::Rect& bounds) {
GetWindowLong(hwnd(), GWL_STYLE),
GetWindowLong(hwnd(), GWL_EXSTYLE),
bounds);
+ unsigned int flags = SWP_NOREPOSITION;
+ if (!::IsWindowVisible(hwnd()))
+ flags |= SWP_NOACTIVATE;
SetWindowPos(hwnd(), NULL, window_bounds.x(), window_bounds.y(),
- window_bounds.width(), window_bounds.height(),
- SWP_NOREPOSITION);
+ window_bounds.width(), window_bounds.height(), flags);
}
gfx::Rect WinWindow::GetBounds() {
« no previous file with comments | « no previous file | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698