Revision: 8240
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8240&view=rev
Author:   mdehoon
Date:     2010-04-17 13:45:13 +0000 (Sat, 17 Apr 2010)

Log Message:
-----------
Fixing bug #2891502 by allowing window sizes larger than the screen.

Modified Paths:
--------------
    trunk/matplotlib/src/_macosx.m

Modified: trunk/matplotlib/src/_macosx.m
===================================================================
--- trunk/matplotlib/src/_macosx.m      2010-04-16 19:02:22 UTC (rev 8239)
+++ trunk/matplotlib/src/_macosx.m      2010-04-17 13:45:13 UTC (rev 8240)
@@ -320,6 +320,7 @@
 {   PyObject* manager;
 }
 - (Window*)initWithContentRect:(NSRect)rect styleMask:(unsigned int)mask 
backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation 
withManager: (PyObject*)theManager;
+- (NSRect)constrainFrameRect:(NSRect)rect toScreen:(NSScreen*)screen;
 - (BOOL)closeButtonPressed;
 - (void)close;
 - (void)dealloc;
@@ -4396,6 +4397,16 @@
     return self;
 }
 
+- (NSRect)constrainFrameRect:(NSRect)rect toScreen:(NSScreen*)screen
+{
+    /* Allow window sizes larger than the screen */
+    NSRect suggested = [super constrainFrameRect: rect toScreen: screen];
+    const CGFloat difference = rect.size.height - suggested.size.height;
+    suggested.origin.y -= difference;
+    suggested.size.height += difference;
+    return suggested;
+}
+
 - (BOOL)closeButtonPressed
 {
     PyObject* result;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to