From 8b83ed0f73105074239c9c083be343ad6a836ec0 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 2 Apr 2012 23:14:33 +0000 Subject: - Improve mouse tracking logic in PSMTabBar, fixing dragging issues (Issue #1003) --- Frameworks/PSMTabBar/PSMTabBarControl.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Frameworks/PSMTabBar') diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m index 416b10d8..2a92a2b1 100644 --- a/Frameworks/PSMTabBar/PSMTabBarControl.m +++ b/Frameworks/PSMTabBar/PSMTabBarControl.m @@ -1354,7 +1354,7 @@ - (void)mouseDragged:(NSEvent *)theEvent { - if ([self lastMouseDownEvent] == nil) { + if (![self lastMouseDownEvent]) { return; } @@ -1412,6 +1412,10 @@ - (void)mouseUp:(NSEvent *)theEvent { + if (![self lastMouseDownEvent]) { + return; + } + if (_resizing) { _resizing = NO; [[NSCursor arrowCursor] set]; @@ -1460,6 +1464,9 @@ _closeClicked = NO; } + + // Clear the last mouse down event to prevent drag issues + [self setLastMouseDownEvent:nil]; } - (NSMenu *)menuForEvent:(NSEvent *)event -- cgit v1.2.3