mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 21:51:00 +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
c331982016
commit
50853d37f8
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>
|
2014-12-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSDocumentFrameworkPrivate.h,
|
* Source/NSDocumentFrameworkPrivate.h,
|
||||||
|
|
|
@ -3653,6 +3653,7 @@ checkCursorRectanglesExited(NSView *theView, NSEvent *theEvent, NSPoint lastPoi
|
||||||
GSTrackingRect *rects[count];
|
GSTrackingRect *rects[count];
|
||||||
NSPoint loc = [theEvent locationInWindow];
|
NSPoint loc = [theEvent locationInWindow];
|
||||||
NSPoint lastPoint = _lastPoint;
|
NSPoint lastPoint = _lastPoint;
|
||||||
|
NSRect vr = [theView visibleRect];
|
||||||
NSUInteger i;
|
NSUInteger i;
|
||||||
|
|
||||||
lastPoint = [theView convertPoint: lastPoint fromView: nil];
|
lastPoint = [theView convertPoint: lastPoint fromView: nil];
|
||||||
|
@ -3664,13 +3665,14 @@ checkCursorRectanglesExited(NSView *theView, NSEvent *theEvent, NSPoint lastPoi
|
||||||
BOOL last;
|
BOOL last;
|
||||||
BOOL now;
|
BOOL now;
|
||||||
GSTrackingRect *r = rects[i];
|
GSTrackingRect *r = rects[i];
|
||||||
|
NSRect tr = NSIntersectionRect(vr, r->rectangle);
|
||||||
|
|
||||||
if ([r isValid] == NO)
|
if ([r isValid] == NO)
|
||||||
continue;
|
continue;
|
||||||
/* Check mouse at last point */
|
/* Check mouse at last point */
|
||||||
last = NSMouseInRect(lastPoint, r->rectangle, isFlipped);
|
last = NSMouseInRect(lastPoint, tr, isFlipped);
|
||||||
/* Check mouse at current point */
|
/* Check mouse at current point */
|
||||||
now = NSMouseInRect(loc, r->rectangle, isFlipped);
|
now = NSMouseInRect(loc, tr, isFlipped);
|
||||||
|
|
||||||
if ((!last) && (now)) // Mouse entered event
|
if ((!last) && (now)) // Mouse entered event
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue