Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316712 - [widgets] Clicking in empty space can cause clicks in views
Summary: [widgets] Clicking in empty space can cause clicks in views
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X
: P3 minor (vote)
Target Milestone: 3.7 M3   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-13 21:48 EDT by Jacob Weber CLA
Modified: 2010-10-21 17:36 EDT (History)
3 users (show)

See Also:


Attachments
Fix (4.48 KB, patch)
2010-10-12 20:17 EDT, Scott Kovatch CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Weber CLA 2010-06-13 21:48:05 EDT
1. Open the Java perspective, or any other perspective where there's a view on the left (e.g. Package Exlorer), and no open views to the right of it.
2. Click once within the view on the left.
3. In the empty space to the right, quickly right-click then left-click.
4. This registers as a double-click within the view on the left. The vertical position of the registered double-click will be the same as the vertical position of the mouse.


-- Configuration Details --
Product: Eclipse 1.3.0.20100609-1425 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.platform 3.6.0.v20100602-9gF78GpqFt6trOGhL5t0nJy5fyGHKrwNY
Comment 1 Prakash Rangaraj CLA 2010-06-14 00:29:48 EDT
I can't reproduce this. But it looks like SWT bug. Assigning to SWT for comments.
Comment 2 Scott Kovatch CLA 2010-06-21 18:22:02 EDT
I can reproduce this on the 3.6 GM candidate. That's a cool bug! I'll take it.
Comment 3 Jacob Weber CLA 2010-06-21 18:27:01 EDT
Thanks...my habit of randomly clicking everywhere sometimes pays off. :)

Speaking of which, #316963 seems similar -- maybe they're related.
Comment 4 Scott Kovatch CLA 2010-06-21 18:38:29 EDT
They likely have the same root cause -- we don't check the buttonMask to see if the first and second events of a click came from the same button, though it's odd that NSEvent.clickCount() doesn't reset if a different button was pressed the first time.
Comment 5 Scott Kovatch CLA 2010-10-12 20:17:18 EDT
Created attachment 180716 [details]
Fix

Carbon apparently had this bug as well. The button count doesn't reset if the button clicked doesn't change. It was fixed by tracking the last button clicked.
Comment 6 Scott Kovatch CLA 2010-10-12 20:26:57 EDT
Double-clicks in general have idiosyncrasies right now in Cocoa, and this fix addresses those, along with bug 316963. We were send the MouseDoubleClick event on the second mouse down, which is inconsistent with the rest of Mac OS X. This change moves the double-click event so it is sent just before the second mouse up in a double-click sequence. That way, if you start a double-click but hold down the mouse on the second click you won't get a double-click if released after the double-click delay.

This is, BTW, the true fix for bug 313208.
Comment 7 Scott Kovatch CLA 2010-10-12 20:33:23 EDT
Fixed > 20101012.