JDK-6179669 : REGRESSION: When switching to a workspace, Java app grabs focus.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2004-10-15
  • Updated: 2011-01-19
  • Resolved: 2004-10-18
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.
Other
5.0Resolved
Related Reports
Duplicate :  
Description
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

Comments
EVALUATION This is a duplicate of 5094112 ###@###.### 10/18/04 14:57 GMT
18-10-2004