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

new window takes focus (overrides window manager policy)

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      x86
    • OS:
      linux

      Description

      Name: gm110360 Date: 02/25/2004


      FULL PRODUCT VERSION :
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux dsb 2.4.18+dsb+smp+ide #1 SMP Wed Feb 12 15:39:11 EST 2003 i686 unknown




      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Window manager: FVWM
      Window manager focus mode: point to focus (focus goes to window under mouse
      cursor; a new application window is supposed to get focus only if it gets placed under
      the mouse cursor)

      A DESCRIPTION OF THE PROBLEM :
      When a Java JFrame window appears on the screen, it steals the window focus regardless
      of whether it should have gotten the focus.

      Specifically, it does not let the window manager apply the window manager's configured
      focus policy. It apparently actively takes the focus.

      This behavior most probably violates X11 rules.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Get a sufficiently capable window manager (e.g., FVWM) and configure it so that:
      - a window that is in front of other windows does not necessarily have the
        focus (e.g., "point-to-focus"/"focus-follows-mouse" mode)
      - a new window does not necessarily get focus (again, point-to-focus mode)
      - new windows get placed without user interaction

      Position windows and the mouse cursor (and set up whatever else) such that creating a
      new window should leave the focus in some previous window (e.g., the terminal window from
      which the Java test program is run). (For example, put the mouse cursor in a corner (maybe
      the lower right corner) so a new window is unlikely to "land" under the cursor and be given focus
      by the window manager.)

      Create a JFrame window.



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The expected behavior is for the JFrame window to appear without taking the focus
      (unless it lands under the mouse cursor or otherwise triggers the window manager to
      give it focus per window manager policy settings).
      ACTUAL -
      The actual behavior is that when the JFrame wnidow appears it takes the focus even
      though it did not get placed under the mouse cursor or otherwise qualify to get the focus
      per the window manager settings.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Creating a simple JFrame and making it visible should be sufficient.
      ---------- END SOURCE ----------
      (Incident Review ID: 239306)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ant Anton Tarasov
                Reporter:
                gmanwanisunw Girish Manwani (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: