diff --git a/ChangeLog b/ChangeLog index 9a0911c45..67a7bf00c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-09-03 Wolfgang Lux + + * Source/NSWindow.m (_screenForFrame:): Fix bug where this method + was returning nil when the frame had zero width or height. This + could destroy a valid screen attribute of a window. + 2012-09-02 German A. Arias * Source/GSToolTips.m (_timedOut:): Don't display the tooltip diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 793ffab5e..a3beb3f91 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -388,7 +388,7 @@ has blocked and waited for events. */ - (NSScreen *) _screenForFrame: (NSRect)frame { - NSInteger largest = 0; + NSInteger largest = -1; NSArray *screens = [NSScreen screens]; NSInteger index = 0; NSScreen *theScreen = nil;