Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6181677

Java applications steal the focus on Linux

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 5.0u1
    • 5.0u1
    • client-libs
    • None
    • x86
    • linux

      When I run any java window application, e.g., bugster or demo/jfc/Java2D/Java2Demo.jar, the application steals the focus whenever I change virtual desktop.

      I'm using the metacity window manager which is standard in modern RedHat/Fedora distributions. JDS could be affected as well.

      How to reproduce the problem:

      1. Have at least two virtual desktops open
      2. start a java application, e.g. Java2Demo.jar
      3. start a gnome-terminal and make sure it has focus
      4. switch to the other virtual desktop (using a keybinding, I think the default is Ctrl-Alt-Left/Right).
      5. switch back.

      Now the Java application will have stolen the focus that belonged to the gnome-terminal. Mostly, the gnome-terminal will be on top, so the user might not notice that the Java application has stolen the focus and start typing into the wrong window.

      The problem isn't present in this JDK:
      java version "1.4.2_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
      Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)

      The problem is present in this JDK:
      java version "1.5.0_01-ea"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-ea-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_01-ea-b03, mixed mode, sharing)

      I'm running this Linux distribution:
      Fedora Core release 2 (Tettnang)
      ###@###.### 10/20/04 03:24 GMT

            ant Anton Tarasov (Inactive)
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: