mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 08:30:59 +00:00
* Source/NSCursor.m (-mouseEntered:, -mouseExited:):
Add better debug output. * Source/NSWindow.m (-_checkCursorRectangles:forEvent:): Add hack that updates cursor rectangles more correctly. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37022 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a93d126191
commit
aa9d40fcfd
3 changed files with 19 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2013-08-27 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSCursor.m (-mouseEntered:, -mouseExited:):
|
||||
Add better debug output.
|
||||
* Source/NSWindow.m (-_checkCursorRectangles:forEvent:): Add hack
|
||||
that updates cursor rectangles more correctly.
|
||||
|
||||
2013-08-19 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSTreeController.h,
|
||||
|
|
|
@ -434,6 +434,8 @@ backgroundColorHint:(NSColor *)bg
|
|||
*/
|
||||
- (void) mouseEntered: (NSEvent*)theEvent
|
||||
{
|
||||
NSDebugLLog(@"NSCursor", @"Cursor mouseEntered:enter %d exit %d",
|
||||
_cursor_flags.is_set_on_mouse_entered, _cursor_flags.is_set_on_mouse_exited);
|
||||
if (_cursor_flags.is_set_on_mouse_entered == YES)
|
||||
{
|
||||
[self set];
|
||||
|
@ -454,7 +456,8 @@ backgroundColorHint:(NSColor *)bg
|
|||
*/
|
||||
- (void) mouseExited: (NSEvent*)theEvent
|
||||
{
|
||||
NSDebugLLog(@"NSCursor", @"Cursor mouseExited:");
|
||||
NSDebugLLog(@"NSCursor", @"Cursor mouseExited: enter %d exit %d",
|
||||
_cursor_flags.is_set_on_mouse_entered, _cursor_flags.is_set_on_mouse_exited);
|
||||
if (_cursor_flags.is_set_on_mouse_exited == YES)
|
||||
{
|
||||
[self set];
|
||||
|
|
|
@ -3598,6 +3598,13 @@ resetCursorRectsForView(NSView *theView)
|
|||
|
||||
- (void) _checkCursorRectangles: (NSView*)theView forEvent: (NSEvent*)theEvent
|
||||
{
|
||||
// FIXME: What this method should do is to send exit events before enter events
|
||||
// And all enter events should be sorted from outer to inner. With the current
|
||||
// hack to post the enter events at the end of the queue this is about correct,
|
||||
// as long as nothing else is in the event queue :-(
|
||||
// Most likely similar reasoning should be applied to _checkTrackingRectangles:forEvent:
|
||||
// the best way to achive this seems to be having to separate loops over the hierarchy.
|
||||
|
||||
if (theView->_rFlags.valid_rects)
|
||||
{
|
||||
NSArray *tr = theView->_cursor_rects;
|
||||
|
@ -3641,7 +3648,7 @@ resetCursorRectsForView(NSView *theView)
|
|||
eventNumber: 0
|
||||
trackingNumber: (int)YES
|
||||
userData: (void*)r];
|
||||
[self postEvent: e atStart: YES];
|
||||
[self postEvent: e atStart: NO];
|
||||
}
|
||||
// Mouse exited
|
||||
if ((last) && (!now))
|
||||
|
|
Loading…
Reference in a new issue