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

Unified Diff: chrome/common/win_util.cc

Issue 13100: Fixes bug in window positioning that resulted in positioning... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/win_util.cc
===================================================================
--- chrome/common/win_util.cc (revision 6250)
+++ chrome/common/win_util.cc (working copy)
@@ -584,10 +584,14 @@
// windows in hyperspace.
// TODO(mpcomplete): I don't see what the second check in each 'if' does that
// isn't handled by the LAST set of 'ifs'. Maybe we can remove it.
- if (child_rect->x() < 0 || child_rect->x() > parent_rect.right())
- child_rect->set_x(padding);
- if (child_rect->y() < 0 || child_rect->y() > parent_rect.bottom())
- child_rect->set_y(padding);
+ if (child_rect->x() < parent_rect.x() ||
+ child_rect->x() > parent_rect.right()) {
+ child_rect->set_x(parent_rect.x() + padding);
+ }
+ if (child_rect->y() < parent_rect.y() ||
+ child_rect->y() > parent_rect.bottom()) {
+ child_rect->set_y(parent_rect.y() + padding);
+ }
// LAST, nudge the window back up into the client area if its x,y position is
// within the parent bounds but its width/height place it off-screen.
« 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