Fix bug where the -_screenForFrame: method was returning nil when the

frame had zero width or height. This could destroy a valid screen
attribute of a window.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35502 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2012-09-03 13:24:03 +00:00
parent 4761f9aa2a
commit 01aa0dbdc3
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2012-09-03 Wolfgang Lux <wolfgang.lux@gmail.com>
* 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 <german@xelalug.org>
* Source/GSToolTips.m (_timedOut:): Don't display the tooltip

View file

@ -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;