From 3e8bcc22f408012fe771b800ca6fb9403db7c74f Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Fri, 4 Jul 2014 18:10:38 +0000 Subject: [PATCH] * Source/GSWindowDecorationView.m (-changeWindowHeight:): Add workaround to adjust window min and max size when the height changes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37982 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/GSWindowDecorationView.m | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 12a73cece..fa38a8937 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-07-04 Fred Kiefer + + * Source/GSWindowDecorationView.m (-changeWindowHeight:): Add + workaround to adjust window min and max size when the height changes. + 2014-06-17 Fred Kiefer * TextConverters/RTF/rtfGrammar.y, diff --git a/Source/GSWindowDecorationView.m b/Source/GSWindowDecorationView.m index 63c37540a..32145f1a8 100644 --- a/Source/GSWindowDecorationView.m +++ b/Source/GSWindowDecorationView.m @@ -355,6 +355,20 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor) NSRect windowFrame; NSRect windowContentFrame; + // 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