mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 12:21:07 +00:00
Improvements to handle cursors.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36802 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d7dc57f31a
commit
c4080b3b73
3 changed files with 18 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2013-07-02 German A. Arias <german@xelalug.org>
|
||||
|
||||
* 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 <german@xelalug.org>
|
||||
|
||||
* Source/NSComboBoxCell.m (-initWithContentRect:...):
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**<p>Sets the NSCursor as the current cursor.</p>
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue