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

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

Issue 113962: Fixes bug where SetBounds would change the z-order. This was resulting... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | « no previous file | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #include "base/gfx/native_theme.h" 9 #include "base/gfx/native_theme.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 GetClientRect(&crect); 249 GetClientRect(&crect);
250 POINT p = {0, 0}; 250 POINT p = {0, 0};
251 ::ClientToScreen(hwnd_, &p); 251 ::ClientToScreen(hwnd_, &p);
252 out->SetRect(crect.left + p.x, crect.top + p.y, 252 out->SetRect(crect.left + p.x, crect.top + p.y,
253 crect.Width(), crect.Height()); 253 crect.Width(), crect.Height());
254 } 254 }
255 255
256 void WidgetWin::SetBounds(const gfx::Rect& bounds) { 256 void WidgetWin::SetBounds(const gfx::Rect& bounds) {
257 SetWindowPos(NULL, bounds.x(), bounds.y(), bounds.width(), bounds.height(), 257 SetWindowPos(NULL, bounds.x(), bounds.y(), bounds.width(), bounds.height(),
258 SWP_NOACTIVATE); 258 SWP_NOACTIVATE | SWP_NOZORDER);
259 } 259 }
260 260
261 void WidgetWin::Close() { 261 void WidgetWin::Close() {
262 if (!IsWindow()) 262 if (!IsWindow())
263 return; // No need to do anything. 263 return; // No need to do anything.
264 264
265 // Let's hide ourselves right away. 265 // Let's hide ourselves right away.
266 Hide(); 266 Hide();
267 if (close_widget_factory_.empty()) { 267 if (close_widget_factory_.empty()) {
268 // And we delay the close so that if we are called from an ATL callback, 268 // And we delay the close so that if we are called from an ATL callback,
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result)) 1032 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result))
1033 result = DefWindowProc(window, message, w_param, l_param); 1033 result = DefWindowProc(window, message, w_param, l_param);
1034 if (message == WM_NCDESTROY) { 1034 if (message == WM_NCDESTROY) {
1035 widget->hwnd_ = NULL; 1035 widget->hwnd_ = NULL;
1036 widget->OnFinalMessage(window); 1036 widget->OnFinalMessage(window);
1037 } 1037 }
1038 return result; 1038 return result;
1039 } 1039 }
1040 1040
1041 } // namespace views 1041 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698