Bug 78571 - [consistency] Tree fires expand/collapse before KeyDown
Summary: [consistency] Tree fires expand/collapse before KeyDown
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux-Motif
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords: consistency
Depends on:
Blocks:
 
Reported: 2004-11-12 18:04 EST by Grant Gayed CLA
Modified: 2007-07-19 17:19 EDT (History)
1 user (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 18:04:42 EST
- run the ControlExample, Tree tab
- turn on the Expand, Collapse and KeyDown listeners
- select Node 1 in the example Tree widget, and press the right arrow
  -> on motif the events are Expand and then KeyDown
  -> everywhere else the events are KeyDown and then Expand
- same goes for collapsing with the right arrow key
Comment 1 Steve Northover CLA 2004-11-15 17:03:57 EST
This happens because the Tree on Motif hooks SWT.KeyDown in order to issue 
SWT.Expand.  This means that application code that also hooks SWT.KeyDown will 
run after the Motif Tree key handler and therefore also after SWT.Expand.  
Hard to fix.
Comment 2 Grant Gayed CLA 2004-11-26 16:55:27 EST
I notice now that this "wrong" event ordering happens on motif and win32, 
the "right" ordering happens on gtk, and mac is 50/50 ("right" on keyboard 
and "wrong" on mouse).  In a quick experiment all "wrong" cases were made to 
match gtk just by having them post their Expands and Collapses (observing the 
ordering of MouseDown/Up, KeyDown/Up, Expand/Collapse and Selection).  SN is 
there a compelling reason that Expand/Collapse should not be posted?
Comment 3 Steve Northover CLA 2005-01-19 19:44:28 EST
GG to prioritize.
Comment 4 Grant Gayed CLA 2005-06-09 17:02:00 EDT
this is now fixed on motif as a result of the fix for bug 98024.
Comment 5 Grant Gayed CLA 2007-07-19 17:19:27 EDT
This event ordering is now consistent on all platforms, closing report.