From bba3a516215259c1f216c15cdcc600349cfdba59 Mon Sep 17 00:00:00 2001 From: espectador Date: Mon, 8 Jul 2013 01:33:25 +0000 Subject: [PATCH] Revert last commit. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36849 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Headers/AppKit/NSCursor.h | 2 -- Source/NSCursor.m | 23 +---------------------- 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e2732685..c25c80e62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-07-07 German A. Arias + + * Headers/AppKit/NSCursor.h: + * Source/NSCursor.m (-init, -push, -pop): Revert last commit. + 2013-07-07 German A. Arias * Headers/AppKit/NSCursor.h: Add _windowNum and _cursorRect. diff --git a/Headers/AppKit/NSCursor.h b/Headers/AppKit/NSCursor.h index bd0051c61..bbfbe9a67 100644 --- a/Headers/AppKit/NSCursor.h +++ b/Headers/AppKit/NSCursor.h @@ -49,8 +49,6 @@ unsigned int reserved: 25; } _cursor_flags; void *_cid; - NSInteger _windowNum; - NSRect _cursorRect; } /* diff --git a/Source/NSCursor.m b/Source/NSCursor.m index be62fe7ee..70da83128 100644 --- a/Source/NSCursor.m +++ b/Source/NSCursor.m @@ -35,13 +35,11 @@ #import "AppKit/NSColor.h" #import "AppKit/NSCursor.h" -#import "AppKit/NSEvent.h" #import "AppKit/NSGraphics.h" #import "AppKit/NSImage.h" #import "AppKit/NSBitmapImageRep.h" #import "GNUstepGUI/GSDisplayServer.h" -#import "GNUstepGUI/GSTrackingRect.h" // Class variables static NSMutableArray *gnustep_gui_cursor_stack; @@ -317,8 +315,6 @@ NSCursor *getStandardCursor(NSString *name, int style) */ - (id) init { - _windowNum = -1; - _cursorRect = NSZeroRect; return [self initWithImage: nil hotSpot: NSZeroPoint]; } @@ -444,26 +440,11 @@ backgroundColorHint:(NSColor *)bg } else if (_cursor_flags.is_set_on_mouse_exited == NO) { - NSInteger num = [theEvent windowNumber]; - GSTrackingRect *r =(GSTrackingRect*)[theEvent userData]; /* * Undocumented behavior - if a cursor is not set on exit or entry, * we assume a push-pop situation instead. */ - - /* First check if the cursor rect is currently updated. This prevent - * add the same cursor for the same cursor rect. This happen sometimes - * when the window become the main/key window, and the cursor is over - * a cursor rect. - */ - if ( !(NSEqualRects(_cursorRect, r->rectangle) && - (_windowNum == num) && - [gnustep_gui_current_cursor isEqual: self]) ) - { - [self push]; - _windowNum = num; - _cursorRect = r->rectangle; - } + [self push]; } } @@ -485,8 +466,6 @@ backgroundColorHint:(NSColor *)bg * we assume a push-pop situation instead. */ [self pop]; - _windowNum = -1; - _cursorRect = NSZeroRect; } else {