Bug 195165 - [Tool] Tools receive multiple handleButtonUp() calls when doing a quick drag and release.
Summary: [Tool] Tools receive multiple handleButtonUp() calls when doing a quick drag ...
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-02 14:01 EDT by Tom Crockett CLA
Modified: 2010-11-04 07:37 EDT (History)
1 user (show)

See Also:


Attachments
The first (buggy) event generated during a mouse move. (2.01 KB, text/plain)
2007-07-02 14:02 EDT, Tom Crockett CLA
no flags Details
The second (correct) event generated by an swt mouseup. (2.01 KB, text/plain)
2007-07-02 14:03 EDT, Tom Crockett CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Crockett CLA 2007-07-02 14:01:06 EDT
If I do a slow drag and release on my GEF canvas, the tool receives only one call to handleButtonUp(), generated from the Eclipse mouse-up event. If however I drag and release quickly, the tool receives 2 calls to handleButtonUp(), the first being generated during a mouse move, and the second by the mouse up. Attached are two stacktraces showing how each gets generated. The first event is generated from what looks like a hacky section of code in AbstractTool.mouseMove(...), to wit:

if (!isInputSynched(me)) {
boolean b1 = getCurrentInput().isMouseButtonDown(1);
		boolean b2 = getCurrentInput().isMouseButtonDown(2);
		boolean b3 = getCurrentInput().isMouseButtonDown(3);
		boolean b4 = getCurrentInput().isMouseButtonDown(4);
		boolean b5 = getCurrentInput().isMouseButtonDown(5);
		getCurrentInput().verifyMouseButtons = true;
		getCurrentInput().setInput(me);
		if (b1) handleButtonUp(1);
		if (b2) handleButtonUp(2);
		if (b3) handleButtonUp(3);
		if (b4) handleButtonUp(4);
		if (b5) handleButtonUp(5);
		...
Comment 1 Tom Crockett CLA 2007-07-02 14:02:15 EDT
Created attachment 72884 [details]
The first (buggy) event generated during a mouse move.
Comment 2 Tom Crockett CLA 2007-07-02 14:03:01 EDT
Created attachment 72885 [details]
The second (correct) event generated by an swt mouseup.
Comment 3 Tom Crockett CLA 2007-07-02 14:04:39 EDT
By the way, is there a good reason why we can't vote on GEF bugs?