Bug 78547 - [consistency] Button MenuDetect fires before MouseDown
Summary: [consistency] Button MenuDetect fires before MouseDown
Status: RESOLVED DUPLICATE of bug 79925
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords: consistency
Depends on:
Blocks:
 
Reported: 2004-11-12 16:09 EST by Grant Gayed CLA
Modified: 2020-01-21 08:18 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2004-11-12 16:09:50 EST
- run the ControlExample, Button tab
- turn on listeners MouseDown and MenuDetect
- right-mouse-down on an example Button
  -> on motif and gtk you'll get MenuDetect - MouseDown
  -> on win32 you'll get MouseDown - MenuDetect
Comment 1 Steve Northover CLA 2004-11-15 15:29:46 EST
This isn't a bug.  On Windows, the context menu is displayed when the mouse is 
released.  Is there something I am missing?
Comment 2 Steve Northover CLA 2004-11-15 15:30:03 EST
Zillbuggahhhh!
Comment 3 Grant Gayed CLA 2004-11-15 15:35:42 EST
The report is referring to the linux behaviours, that MenuDetect fires before 
the event that triggered it (the MouseDown).  This is similar to the example 
that Car gave of Selection firing before MouseDown.
Comment 4 Steve Northover CLA 2004-11-15 16:47:01 EST
Got it.
Comment 5 Grant Gayed CLA 2004-11-26 15:14:07 EST
I've looked into this on motif, and it seems unfixable because:
- all mouse event fires go through Control.sendMouseEvent(), which does a post 
(in this context of the MouseDown)
- the MenuDetect cannot be posted because it immediately does a doit=true 
check, hence it comes in before the posted MouseDown does

SN do you remember the history of why all mouse events are posted?  For that 
matter, this would probably be too fundamental and wide-reaching a change to 
consider anyways, no?
Comment 6 Grant Gayed CLA 2004-11-26 15:29:10 EST
the gtk case is the exact same
Comment 7 Steve Northover CLA 2004-11-26 15:39:20 EST
Vikki is investigating this area for drag and drop.  I believe we can change 
it but we need to be careful.  The idea that I have is to post events for 
canvas (where it doesn't matter) and send them for operating system widgets.
Comment 8 Grant Gayed CLA 2005-04-05 10:27:23 EDT
dup


*** This bug has been marked as a duplicate of 79925 ***