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