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

Unified Diff: chrome/browser/cocoa/chrome_browser_window.mm

Issue 385106: [Mac] Fix weird layout issues when dragging a tab from a large screen to a sm... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | chrome/browser/cocoa/tab_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/chrome_browser_window.mm
===================================================================
--- chrome/browser/cocoa/chrome_browser_window.mm (revision 31837)
+++ chrome/browser/cocoa/chrome_browser_window.mm (working copy)
@@ -329,4 +329,15 @@
return shouldHideTitle_;
}
+- (NSRect)constrainFrameRect:(NSRect)frame toScreen:(NSScreen*)screen {
pink (ping after 24hrs) 2009/11/13 22:09:57 add a comment on when and why this gets called.
+ // Do not constrain the frame rect if our delegate says no. In this case,
+ // return the original (unconstrained) frame.
+ id delegate = [self delegate];
+ if ([delegate respondsToSelector:@selector(shouldConstrainFrameRect)] &&
+ ![delegate shouldConstrainFrameRect])
+ return frame;
+
+ return [super constrainFrameRect:frame toScreen:screen];
+}
+
@end
« no previous file with comments | « no previous file | chrome/browser/cocoa/tab_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698