FULL PRODUCT VERSION :
# java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
# uname -a
Linux boco 2.6.8-1-686-smp #1 SMP Sat Aug 28 12:51:43 EDT 2004 i686 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
I use Gnome desktop with Sawfish window manager configured for Focus follows mouse.
A DESCRIPTION OF THE PROBLEM :
If I have a java program running in one workspace but it is not the current focus and then switch to another workspace and then switch back, the java program grabs focus even though the mouse pointer is nowhere near it.
This is particularly annoying when you switch to another workspace to find some information out and then switch back to type it in - the focus has moved to the java program rather than staying with the application that had the focus before the switch/switchback.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run this program on one workspace. Move focus to another window (eg rxvt). Switch workspace and switch back - focus will be in this program.
The following small program demonstrates it:
import java.awt.*;
import javax.swing.*;
public class Test extends JFrame {
public Test() {
super("test");
setSize(new Dimension(100, 200));
setVisible(true);
}
public static void main(String[] args) {
new Test();
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Focus either remain with the window that had it before the switch/switchback or the focus moved to the window currently under the mouse pointer.
ACTUAL -
Focus is grabbed by the java program.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
public class Test extends JFrame {
public Test() {
super("test");
setSize(new Dimension(100, 200));
setVisible(true);
}
public static void main(String[] args) {
new Test();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
none found.
Release Regression From : 1.4.2
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
###@###.### 10/15/04 03:37 GMT