From d54bf55dc0ee24f09299e422e15b139e58768689 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Tue, 26 Mar 2013 17:54:50 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20show=20=E2=80=9Cpop-out?= =?UTF-8?q?=E2=80=9D=20animation=20for=20empty=20rects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #833. --- Frameworks/OakAppKit/src/OakPopOutAnimation.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Frameworks/OakAppKit/src/OakPopOutAnimation.mm b/Frameworks/OakAppKit/src/OakPopOutAnimation.mm index 60a2229f..f0cfa6a6 100644 --- a/Frameworks/OakAppKit/src/OakPopOutAnimation.mm +++ b/Frameworks/OakAppKit/src/OakPopOutAnimation.mm @@ -26,6 +26,9 @@ static double const kFadeDuration = 0.60; void OakShowPopOutAnimation (NSRect aRect, NSImage* anImage) { + if(aRect.size.width == 0 || aRect.size.height == 0) + return; + aRect = NSInsetRect(aRect, -kExtendWidth, -kExtendHeight); NSRect contentRect = NSMakeRect(0, 0, NSWidth(aRect), NSHeight(aRect)); NSWindow* window = [[NSWindow alloc] initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];