From 86c551f017e9b4d4ced54d92efd2e9d37f426d78 Mon Sep 17 00:00:00 2001 From: espectador Date: Fri, 22 Nov 2013 19:21:02 +0000 Subject: [PATCH] Set _lastPoint only for mouse entered events. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37398 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSWindow.m | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 849cb495e..8811178d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-11-22 German Arias + + * NSWindow.m (-sendEvent:): Set _lastPoint only for mouse entered + events. If not, in some cases (i.e. display contextual menus), this + sets the wrong point for the event. + 2013-11-08 Riccardo Mottola * Source/NSBitmapImageRep+GIF.m: diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 85f2bbb65..d6170c8fb 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -4063,16 +4063,17 @@ checkCursorRectanglesExited(NSView *theView, NSEvent *theEvent, NSPoint lastPoi if ([r isValid]) { [c mouseEntered: theEvent]; + + /* This could seems redundant, but ensure the correct + * value to use in events mouse moved. And avoids strange + * issues with cursor. */ + _lastPoint = [theEvent locationInWindow]; } } else // it is a mouse exited { [c mouseExited: theEvent]; } - - /* This could seems redundant, but ensure the correct value to use - * in events mouse moved. And avoids strange issues with cursor. */ - _lastPoint = [theEvent locationInWindow]; } break;