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

REGRESSION: Popups badly broken when window manager does "focus follows mouse"

XMLWordPrintable

    • b36
    • x86
    • linux

        FULL PRODUCT 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 :
        Linux desktop.igoweb.org 2.6.8-1.521smp #1 SMP Mon Aug 16 09:25:06 EDT 2004 i686 i686 i386 GNU/Linux


        EXTRA RELEVANT SYSTEM CONFIGURATION :
          Bug only appears when window manager is set to "focus follows mouse". When it is set to "click to focus", bug does not happen.

        A DESCRIPTION OF THE PROBLEM :
        Unix window managers have traditionally supported two focus models: click to focus (which is the model common in Windows), and focus follows mouse (where the window currently under the mouse is always the one that gets keystrokes). Both systems are fairly common.

        If my window manager (sawfish) is set to "focus follows mouse" and an applications opens a popup that goes beyond the window, then as soon as the mouse moves over the popup, it closes! This makes such popups useless. Combo boxes, context sensitive popup menus, an normal menus all have this problem. If I set my window manager to "click to focus", then the problem goes away.

        This bug does not exist on java 1.4.2 or early, only on java 1.5.

        I submitted this bug two weeks ago, but at that time I did not know that "focus follows mouse" was required to reproduce the bug. I am now resubmitting it with this added key piece of information.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1. Set your window manager to "focus follows mouse".
        2. Compile the java program below into "Popup.class"
        3. Run "java Popup"
        4. Try to click open the combo box and use it.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        The combo box should be completely usable.
        ACTUAL -
        As soon as I try to move the mouse over the opened up list of combo box choices, the list disappears. It is not possible to click or select any of them.

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        import javax.swing.*;
         
        public class Popup {
          public static void main(String[] args) {
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JComboBox combo = new JComboBox(new String[] {
              "aaa", "bbb", "ccc", "ddd", "eee", "fff", "ggg", "hhh"});
            frame.getContentPane().add(combo);
            frame.pack();
            frame.setVisible(true);
          }
        }

        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        Use java 1.4.2. Java 1.5 simply cannot work.

        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.
        ###@###.### 2004-11-08 22:07:40 GMT

              alexp Alexander Potochkin (Inactive)
              gmanwanisunw Girish Manwani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: