-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.1_01
-
None
-
x86
-
linux
Config: Linux + Sawfish/Enligntenment + jdk 1.3.1_01
WINDOW_DEACTIVATED and WINDOW_ACTIVATED events are expected to be fired when the
user switches the focus from/to an AWT Frame. This does not happen if the user uses Alt+TAB
to do the switching. This causes a significant problem for Forte for Java/NetBeans IDE.
See the IDE bug description at
http://www.netbeans.org/issues/show_bug.cgi?id=16755
After playing with xev utility and studying JDK source code I conclude
that this is a bug in JDK. XEvent of FocusIn/FocusOut type
is mapped and routed to java.awt.Window iff xev->mode == NotifyNormal,
which does not hold when switching b/w native windows using Alt+Tab.
For jdk 1.3.1 we can work around the bug by hooking into AWTEvent queue
(using AWTEventListener) and react to FOCUS_GAINED event. The hack is
extremely ugly but it works. On JDK 1.4 beta3 even FOCUS_GAINED is not
fired so we are out of luck.
Although the testing environment is Linux + Sawfish, I suspect that the same
defect is present on Solaris+CDE
WINDOW_DEACTIVATED and WINDOW_ACTIVATED events are expected to be fired when the
user switches the focus from/to an AWT Frame. This does not happen if the user uses Alt+TAB
to do the switching. This causes a significant problem for Forte for Java/NetBeans IDE.
See the IDE bug description at
http://www.netbeans.org/issues/show_bug.cgi?id=16755
After playing with xev utility and studying JDK source code I conclude
that this is a bug in JDK. XEvent of FocusIn/FocusOut type
is mapped and routed to java.awt.Window iff xev->mode == NotifyNormal,
which does not hold when switching b/w native windows using Alt+Tab.
For jdk 1.3.1 we can work around the bug by hooking into AWTEvent queue
(using AWTEventListener) and react to FOCUS_GAINED event. The hack is
extremely ugly but it works. On JDK 1.4 beta3 even FOCUS_GAINED is not
fired so we are out of luck.
Although the testing environment is Linux + Sawfish, I suspect that the same
defect is present on Solaris+CDE
- duplicates
-
JDK-4503980 Focus lost/gain events get lost when gaining focus on external CDE component
-
- Resolved
-
- relates to
-
JDK-4504821 Focus is not regained sometimes when alt-tabbing between applications
-
- Closed
-