mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:04:20 +00:00
Fix tooltips issue with a change suggested by Fred.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38262 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5e48d016ef
commit
b0ab141b9a
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2014-12-26 German Arias <germanandre@gmx.es>
|
||||
|
||||
* Source/NSWindow.m (_checkTrackingRectangles:forEvent:): Use the
|
||||
intersection rectangle with visible rect as suggested by Fred. This
|
||||
avoid send events mouse entered/exited to rectangles that aren't
|
||||
visible.
|
||||
|
||||
2014-12-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSDocumentFrameworkPrivate.h,
|
||||
|
|
|
@ -3653,6 +3653,7 @@ checkCursorRectanglesExited(NSView *theView, NSEvent *theEvent, NSPoint lastPoi
|
|||
GSTrackingRect *rects[count];
|
||||
NSPoint loc = [theEvent locationInWindow];
|
||||
NSPoint lastPoint = _lastPoint;
|
||||
NSRect vr = [theView visibleRect];
|
||||
NSUInteger i;
|
||||
|
||||
lastPoint = [theView convertPoint: lastPoint fromView: nil];
|
||||
|
@ -3664,13 +3665,14 @@ checkCursorRectanglesExited(NSView *theView, NSEvent *theEvent, NSPoint lastPoi
|
|||
BOOL last;
|
||||
BOOL now;
|
||||
GSTrackingRect *r = rects[i];
|
||||
NSRect tr = NSIntersectionRect(vr, r->rectangle);
|
||||
|
||||
if ([r isValid] == NO)
|
||||
continue;
|
||||
/* Check mouse at last point */
|
||||
last = NSMouseInRect(lastPoint, r->rectangle, isFlipped);
|
||||
last = NSMouseInRect(lastPoint, tr, isFlipped);
|
||||
/* Check mouse at current point */
|
||||
now = NSMouseInRect(loc, r->rectangle, isFlipped);
|
||||
now = NSMouseInRect(loc, tr, isFlipped);
|
||||
|
||||
if ((!last) && (now)) // Mouse entered event
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue