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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/platform_window/win/win_window.h" 5 #include "ui/platform_window/win/win_window.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/event_utils.h" 10 #include "ui/events/event_utils.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 void WinWindow::Close() { 68 void WinWindow::Close() {
69 Destroy(); 69 Destroy();
70 } 70 }
71 71
72 void WinWindow::SetBounds(const gfx::Rect& bounds) { 72 void WinWindow::SetBounds(const gfx::Rect& bounds) {
73 gfx::Rect window_bounds = GetWindowBoundsForClientBounds( 73 gfx::Rect window_bounds = GetWindowBoundsForClientBounds(
74 GetWindowLong(hwnd(), GWL_STYLE), 74 GetWindowLong(hwnd(), GWL_STYLE),
75 GetWindowLong(hwnd(), GWL_EXSTYLE), 75 GetWindowLong(hwnd(), GWL_EXSTYLE),
76 bounds); 76 bounds);
77 unsigned int flags = SWP_NOREPOSITION;
78 if (!::IsWindowVisible(hwnd()))
79 flags |= SWP_NOACTIVATE;
77 SetWindowPos(hwnd(), NULL, window_bounds.x(), window_bounds.y(), 80 SetWindowPos(hwnd(), NULL, window_bounds.x(), window_bounds.y(),
78 window_bounds.width(), window_bounds.height(), 81 window_bounds.width(), window_bounds.height(), flags);
79 SWP_NOREPOSITION);
80 } 82 }
81 83
82 gfx::Rect WinWindow::GetBounds() { 84 gfx::Rect WinWindow::GetBounds() {
83 RECT cr; 85 RECT cr;
84 GetClientRect(hwnd(), &cr); 86 GetClientRect(hwnd(), &cr);
85 return gfx::Rect(cr); 87 return gfx::Rect(cr);
86 } 88 }
87 89
88 void WinWindow::SetTitle(const base::string16& title) { 90 void WinWindow::SetTitle(const base::string16& title) {
89 SetWindowText(hwnd(), title.c_str()); 91 SetWindowText(hwnd(), title.c_str());
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 191
190 namespace test { 192 namespace test {
191 193
192 // static 194 // static
193 void SetUsePopupAsRootWindowForTest(bool use) { 195 void SetUsePopupAsRootWindowForTest(bool use) {
194 use_popup_as_root_window_for_test = use; 196 use_popup_as_root_window_for_test = use;
195 } 197 }
196 198
197 } // namespace test 199 } // namespace test
198 } // namespace ui 200 } // namespace ui
OLDNEW
« 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