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

Taskbar entry is not changed after changing window title- Suse

XMLWordPrintable

    • 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 hugo 2.4.21-243-athlon #1 Thu Aug 12 15:24:15 UTC 2004 i686 athlon i386 GNU/Linux

      glibc 2.3.2

      SuSE 9.0

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Xfce 4.0.6 window manager, but it's not important

      A DESCRIPTION OF THE PROBLEM :
      The taskbar entry is set correct initially. It's the same as the window title. If the application changes the window title (e.g. a editor which displays the file name), the taskbar entry is not updated.

      Example program: Before the button is pressed,

      [~] $ xprop | grep XXX
      WM_ICON_NAME(STRING) = "XXX One"
      WM_NAME(STRING) = "XXX One"

      After that:
      [~] $ xprop | grep XXX
      WM_ICON_NAME(STRING) = "XXX One"
      WM_NAME(STRING) = "XXX Two"

      That's the reason. WM_ICON_NAME is responsible for the taskbar entry and is not updated correctly.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Run the attached program.
      2. The taskbar entry is "XXX One". Same as the window title.
      3. Click the button in the window.
      4. The taskbar entry is still "XXX One" while the title is "XXX Two".
      See the xprop output above. Some window managers may use the WM_NAME string as taskbar entry, but that's not a solution.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The taskbar entry should be the same as the window title. In other words, WM_NAME should be the same as WM_ICON_NAME
      ACTUAL -
      The taskbar entry is not the same as the window title, it cannot be changed with the setTitle() method of JFrame.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      There are no error messages.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;
      import java.awt.*;
      import java.awt.event.*;

      public class Title extends JFrame
      {
          private JButton titleButton = new JButton("Change Title");
          
              public Title()
          {
              setTitle("XXX One");
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              getContentPane().add(titleButton);
              
              titleButton.addActionListener(new ActionListener()
              {
                  public void actionPerformed(ActionEvent ae)
                  {
                      setTitle("XXX Two");
                  }
              });
          }
          
          public static void main(String[] args)
          {
              JFrame test = new Title();
                  
              test.setSize(200, 200);
              test.setVisible(true);
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      I don't know a workaround.
      ###@###.### 11/3/04 19:23 GMT

            yan Yuri Nesterenko (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: