Author: mlytwyn Date: Fri Jun 26 18:59:32 2015 New Revision: 38703 URL: http://svn.gna.org/viewcvs/gnustep?rev=38703&view=rev Log: GSWindowDecorationView merge
Modified: libs/gui/branches/gnustep_testplant_branch/Source/GSWindowDecorationView.m Modified: libs/gui/branches/gnustep_testplant_branch/Source/GSWindowDecorationView.m URL: http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/GSWindowDecorationView.m?rev=38703&r1=38702&r2=38703&view=diff ============================================================================== --- libs/gui/branches/gnustep_testplant_branch/Source/GSWindowDecorationView.m (original) +++ libs/gui/branches/gnustep_testplant_branch/Source/GSWindowDecorationView.m Fri Jun 26 18:59:32 2015 @@ -353,20 +353,42 @@ { NSRect orgWindowFrame; NSRect windowFrame; + NSRect windowContentFrame; - if (difference != 0.0) - { + // FIXME: This is needed as long as NSWindow uses fraem limits not content frame limits + NSSize aSize = [window minSize]; + if (!NSEqualSizes(aSize, NSZeroSize)) + { + aSize.height += difference; + [window setMinSize: aSize]; + } + aSize = [window maxSize]; + if (!NSEqualSizes(aSize, NSZeroSize)) + { + aSize.height += difference; + [window setMaxSize: aSize]; + } + contentRect.size.height += difference; + windowFrame = [object_getClass(self) + frameRectForContentRect: contentRect + styleMask: [window styleMask]]; + // Set the local frame without changing the contents view + windowContentFrame = windowFrame; + windowContentFrame.origin = NSZeroPoint; + _autoresizes_subviews = NO; + [super setFrame: windowContentFrame]; + // Keep the top of the window at the same place orgWindowFrame = [window frame]; - windowFrame = orgWindowFrame; windowFrame.origin.y = orgWindowFrame.origin.y + orgWindowFrame.size.height - windowFrame.size.height; windowFrame.origin.x = orgWindowFrame.origin.x; - windowFrame.size.height += difference; + + // then resize the window [window setFrame: windowFrame display: YES]; - } -} + [self layout]; + } /* * Special setFrame: implementation - a minimal autoresize mechanism _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs