JDK-6182359 : Non focusable frame prevents any of it's child windows from gaining focus, on XToolkit
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0,6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9,windows_2000
  • CPU: generic,sparc
  • Submitted: 2004-10-21
  • Updated: 2011-01-19
  • Resolved: 2005-02-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b24Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
I have a frame and 2 child windows. First child window is the parent of the second one. When I make the parent frame non-focusable, none of the component in the child windows gain focus. This is incorrect. This is reprodcubible only on XToolkit and works fine on Motif (Solaris/Linux). This is not reproducible on Win32. Reproducible with Tiger as well as Mustang.

I have attached a sample test. Execute the sample test. You would see a frame and 2 windows each having a textarea. Click the textarea on any of the child windows. If they don't gain focus, the bug is reproduced.
###@###.### 10/21/04 06:11 GMT

Comments
SUGGESTED FIX See Suggested Fix for 6181725. It's one fix for two bugs. ###@###.### 2005-1-14 14:28:49 GMT
14-01-2005

EVALUATION In fact the reverse is the true. The behaviour on XToolkit is correct and the rest is not. Here's what javadoc on Window.isFocused says: "If the focused Window is a Frame or a Dialog it is also the active Window. Otherwise, the active Window is the first Frame or Dialog that is an owner of the focused Window." I.e. in order a Window becomde the focused Window its decorated owner must be active. We should implement this behaviour on Windows (but it's unlikely on Motif). ###@###.### 11/4/04 16:06 GMT Due to dependence between Window.focusableWindowState and Window.isFocusableWindow there's an idea to combine these values into one inside the native code. Then we might keep it up to date not only when showing or hiding Window but also every time when user call Window.setFocusableWindowState(). So it will allow Window to have dynamic focusability. This fix and the fix suggested for 6181725 (where we're going to set CBT hook to filter focus-related messages on non-focusable windows) are going to solve the problem jointly. So it would be better to have one common fix for both these bugs and to test it. ###@###.### 2004-12-03 13:38:23 GMT
04-11-2004