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

Side by Side Diff: views/widget/widget_win.cc

Issue 6268002: WidgetWin::SetBound on a maximized window leaves the window in the 'maximized' state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright year in the modified files. Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « views/views.gyp ('k') | views/widget/widget_win_unittest.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/widget/widget_win.h" 5 #include "views/widget/widget_win.h"
6 6
7 #include "app/l10n_util_win.h" 7 #include "app/l10n_util_win.h"
8 #include "app/system_monitor.h" 8 #include "app/system_monitor.h"
9 #include "app/view_prop.h" 9 #include "app/view_prop.h"
10 #include "app/win/hwnd_util.h" 10 #include "app/win/hwnd_util.h"
11 #include "app/win/win_util.h" 11 #include "app/win/win_util.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 GetClientRect(&crect); 234 GetClientRect(&crect);
235 POINT p = {0, 0}; 235 POINT p = {0, 0};
236 ClientToScreen(hwnd(), &p); 236 ClientToScreen(hwnd(), &p);
237 out->SetRect(crect.left + p.x, crect.top + p.y, 237 out->SetRect(crect.left + p.x, crect.top + p.y,
238 crect.Width(), crect.Height()); 238 crect.Width(), crect.Height());
239 } 239 }
240 240
241 void WidgetWin::SetBounds(const gfx::Rect& bounds) { 241 void WidgetWin::SetBounds(const gfx::Rect& bounds) {
242 if (IsZoomed())
243 ShowWindow(SW_SHOWNOACTIVATE);
242 SetWindowPos(NULL, bounds.x(), bounds.y(), bounds.width(), bounds.height(), 244 SetWindowPos(NULL, bounds.x(), bounds.y(), bounds.width(), bounds.height(),
243 SWP_NOACTIVATE | SWP_NOZORDER); 245 SWP_NOACTIVATE | SWP_NOZORDER);
244 } 246 }
245 247
246 void WidgetWin::MoveAbove(Widget* other) { 248 void WidgetWin::MoveAbove(Widget* other) {
247 gfx::Rect bounds; 249 gfx::Rect bounds;
248 GetBounds(&bounds, false); 250 GetBounds(&bounds, false);
249 SetWindowPos(other->GetNativeView(), bounds.x(), bounds.y(), 251 SetWindowPos(other->GetNativeView(), bounds.x(), bounds.y(),
250 bounds.width(), bounds.height(), SWP_NOACTIVATE); 252 bounds.width(), bounds.height(), SWP_NOACTIVATE);
251 } 253 }
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { 1359 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) {
1358 return Widget::GetWidgetFromNativeView(native_window); 1360 return Widget::GetWidgetFromNativeView(native_window);
1359 } 1361 }
1360 1362
1361 // static 1363 // static
1362 void Widget::NotifyLocaleChanged() { 1364 void Widget::NotifyLocaleChanged() {
1363 NOTIMPLEMENTED(); 1365 NOTIMPLEMENTED();
1364 } 1366 }
1365 1367
1366 } // namespace views 1368 } // namespace views
OLDNEW
« no previous file with comments | « views/views.gyp ('k') | views/widget/widget_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698