diff --git a/ChangeLog b/ChangeLog index 51f6fad75..90a552f55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-07-02 German A. Arias + + * Source/NSCursor.m (-push): If the cursor is the current cursor, + don't set it again. + * Source/NSWindow.m (-sendEvent:): Don't update the cursor if + the window isn't the key window. + 2013-06-22 German A. Arias * Source/NSComboBoxCell.m (-initWithContentRect:...): diff --git a/Source/NSCursor.m b/Source/NSCursor.m index 70da83128..79b685c8c 100644 --- a/Source/NSCursor.m +++ b/Source/NSCursor.m @@ -490,9 +490,13 @@ backgroundColorHint:(NSColor *)bg */ - (void) push { - [gnustep_gui_cursor_stack addObject: gnustep_gui_current_cursor]; - [self set]; - NSDebugLLog(@"NSCursor", @"Cursor push %p", _cid); + // If this is the current cursor, don't set it again. + if (gnustep_gui_current_cursor != self) + { + [gnustep_gui_cursor_stack addObject: gnustep_gui_current_cursor]; + [self set]; + NSDebugLLog(@"NSCursor", @"Cursor push %p", _cid); + } } /**

Sets the NSCursor as the current cursor.

diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 02f54c741..033bfbb60 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -3968,6 +3968,10 @@ resetCursorRectsForView(NSView *theView) { GSTrackingRect *r =(GSTrackingRect*)[theEvent userData]; NSCursor *c = (NSCursor*)[r owner]; + + // Don't update the cursor if the window isn't the key window. + if (!_f.is_key) + break; if ([theEvent trackingNumber]) // It's a mouse entered {