Bug 93551 - Need to know direction of focus traversal when focus is gained
Summary: Need to know direction of focus traversal when focus is gained
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 135874 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-03 11:47 EDT by Randy Hudson CLA
Modified: 2019-09-06 15:31 EDT (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 Randy Hudson CLA 2005-05-03 11:47:25 EDT
I have a canvas with multiple fake widgets on it.  When my canvas gains focus, I
need to know whether I should set "fake focus" on the first or the last fake
widget.  In other words, I need to know whether SHIFT+TAB occurred, or something
else.

There is no state mask on a FocusEvent, so I don't know how to do this.

Our current workaround is just to place focus on the most-recently-focused fake
item, or the first one if there is no MRU.
Comment 1 Steve Northover CLA 2005-05-04 09:39:20 EDT
This information is not available from the operating systems.  For example, 
WM_SETFOCUS on Windows won't tell you whether focus was assigned using the 
keyboard or the mouse.
Comment 2 Randy Hudson CLA 2005-05-04 09:47:43 EDT
Do you have any ideas as to how AWT/Swing with mixed heavyweight composites 
with lightweight components inside handle TAB/Shift+TAB?

I could always try a display filter but it seems like a hack.
Comment 3 Steve Northover CLA 2005-05-04 11:49:51 EDT
I have no knowledge about how Swing works other than to mixing heavyweights 
and lightweights is not recommended/supported.  I read this somewhere on the 
web.
Comment 4 Randy Hudson CLA 2005-05-04 11:53:59 EDT
Good reply. So, resolved, "CANTFIX".
Comment 5 Steve Northover CLA 2005-05-04 12:02:10 EDT
Actually, we should leave this bug open.  On some platforms, native components 
such as the tool bar contain lightweight components (ie. on Windows, each tool 
item is not an HWND).  The strategy they generally use is to remember the item 
that had focus and restore that item when they get focus.  The shell also does 
this when it is activated.

So, WONTFIX is premature.  Post 3.1 is better.
Comment 6 Steve Northover CLA 2005-05-04 12:03:14 EDT
... and CANTFIX because AWT/Swing CANTFIX or WONTFIX doesn't apply.
Comment 7 Chris Gross CLA 2006-04-10 10:35:29 EDT
*** Bug 135874 has been marked as a duplicate of this bug. ***
Comment 8 Eclipse Webmaster CLA 2019-09-06 15:31:53 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.