Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6262392
Votes 72
Synopsis Problem with dismissing dialogs on CDE with XToolkit
Category java:classes_awt
Reported Against b01 , b37
Release Fixed
State 11-Closed, Will Not Fix, bug
Priority: 3-Medium
Related Bugs 6276482 , 6888200
Submit Date 27-APR-2005
Description
In SwingSet demo,  if you popup a dialog and
then dismiss it, a different window other than the parent
gets raised. This seems to happen only with XAWT and only
under CDE, it does not happen under metacity on Linux.
This does not happen with Tiger, it only happens with Mustang.
  xxxxx@xxxxx   2005-04-27 19:50:47 GMT
Work Around
N/A
Evaluation
Still reproducible in Mustang b43 (XAWT, CDE, SwingSet2)
Posted Date : 2005-07-22 09:31:33.0

The problem is in focus policy we use (WM_TAKE_FOCUS, inputFocus:false).  It seems that DTWM searches for the next focused window excluding those which have such a policy set.  If I remove WM_TAKE_FOCUS and set inputFocus to true problem disappears.  However, another problems appears - dialog doesn't receive focus sometimes.
Posted Date : 2005-07-22 09:36:22.0

If I only set inputFocus to true and leave WM_TAKE_FOCUS dialog recieves focus all the time so perhaps this is a solution.  More detailed investigation is necessary.
Posted Date : 2005-07-22 09:39:42.0

Not the change that we can do in Mustang.  There is also a problem with modal dialogs, which require inputFocus=false and WM_TAKE_FOCUS.
Posted Date : 2005-09-27 10:54:23.0
Comments
  
  Include a link with my name & email   

Submitted On 19-APR-2007
dicecca
This and a problem launching Windows batch files via Runtime.exec() and ProcessBuilder.start() kept us from releasing our latest build w/Java 1.6.  I'm surprised that there aren't more votes on this bug.  Maybe not a lot of CDE users, and the severity of the problem depends on your desktop settings.


Submitted On 19-APR-2007
This 1.6 limitation is a show-stopper for m team.


Submitted On 19-APR-2007
This needs to be a high priority fix. We need to splinter off this update ASAP.


Submitted On 19-APR-2007
-0----
This 1.6 limitation is a show-stopper for m team.


Submitted On 19-APR-2007
JJ, please vote on this bug!


Submitted On 19-APR-2007
When a modal dialog box comes to the top on Solaris platforms, its parent window disappears either beneath its own parent or some other unrelated window (such as a terminal window, for example).  This annoyance is only exceeded by the dialog window popping "down" (i.e., hidden) beneath its parent, preventing the application from responding to any user input until the hidden window is discovered and its message responded to.


Submitted On 19-APR-2007
It took us a while to peel the onion and figure out this was our issue, but it's definitely causing us issues with CDE


Submitted On 20-APR-2007
mdarby
Please fix :-)


Submitted On 20-APR-2007
mdarby
Please Fix :-)


Submitted On 20-APR-2007
mdarby
Please Fix :-)


Submitted On 14-MAY-2007
This problem is still present in JAVA 6 on Solaris Common Desktop Env.   The problem is when you have 2 frames open (second on top of the first frame) and open a dialog box.  When Dialog is disposed, first frame comes to the front and hides the second frame.   This is intermittent but very easily reproducible!    Cannot reproduce this problem in windows!  This also does NOT seem to be a problem in Java 1.5!

See below code for example:
/*
 * Main.java
 *
 * Created on May 14, 2007, 5:43 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package helloworldframe;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 *
 * @author pfukson
 */
public class HelloWorldFrame extends JFrame {
    
    /** Creates a new instance of Main */
    public HelloWorldFrame() {
        super("first Frame");
        
        JPanel panel = new JPanel(new GridLayout(1,1));
        panel.setPreferredSize( new Dimension(600,600));
        panel.setMinimumSize( new Dimension( 600, 600 ));
        
        setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        
        JButton button = new JButton("Press me for second frame");
        button.addActionListener(
                new ActionListener(){
                    public void actionPerformed( ActionEvent actionEvent ){
                        try {
                            secondFrame sf = new secondFrame();
                            sf.setVisible(true);

                        } catch( Exception e ) {
                            e.printStackTrace();
                        }
                    }
                }
        );
        panel.add( button );
        (this).add( panel );        
        (this).pack();
        this.setLocation(0,0);
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            HelloWorldFrame fsf = new HelloWorldFrame();
            fsf.setVisible(true);
        } catch( Exception e ){
            e.printStackTrace();
        }
    }
    
}

class secondFrame extends JFrame {
        
    public secondFrame(){
        super("second frame");
        
        JPanel panel = new JPanel( new GridLayout(1,1));
        panel.setPreferredSize( new Dimension( 200, 100));
        panel.setMinimumSize( new Dimension( 200, 100 ));
        
        setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        
        JButton button = new JButton("Press me for jdialog");
        button.addActionListener(
                new ActionListener(){
                    public void actionPerformed( ActionEvent actionEvent ){
                        final JDialog jd = new JDialog();
                        JPanel xx = new JPanel( new GridLayout(1,1));
                        JButton button = new JButton("Press me for second frame");

                        button.addActionListener(
                            new ActionListener(){
                                public void actionPerformed( ActionEvent actionEvent ){
                                    jd.dispose();
                                }
                            }
                        );
                        xx.add(button);
                        jd.add(xx);
                        jd.pack();
                        jd.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                        jd.setVisible( true );
                        jd.setLocation( 220, 220 );
                    }
                }
        );
        
        panel.add( button );
        (this).add( panel );
        (this).pack();
        this.setLocation(0,0);
  
    }
}


Submitted On 18-JUN-2007
This is also a problem on Linux running the Motif Window Manager (mwm). When a child window displays a modal dialog, it appears that the order of all displayed Java windows is shuffled, so that a window that was previously in back will now be in front of the child window which spawned the modal dialog. Also, when the modal dialog is disposed, the window which spawned the dialog does not receive focus back. This is a killer if you are running Motif.


Submitted On 18-JUN-2007
Does anyone know of any workarounds for this issue? Does anyone know if this bug is currently being worked on for a possible 6u2 release? Falling back to Java 5 is a poor solution, but it's the only option I've found so far.


Submitted On 07-AUG-2007
The best workaround is to upgrade to a 20th century operating system with a modern window manager... But hey, that's just me.


Submitted On 26-SEP-2007
dicecca
It's been ***two years*** since the last "Evaluation" comment from Sun.  Is this really "in progress"?  We've always adopted new versions of Java quickly to take advantage of new features and performance improvements and we really want Java 6, but the Solaris CDE problems are show stoppers for us.  Any chance this will get fixed in Update 3?


Submitted On 03-OCT-2007
We have had to pull back our adoption of JDK6 twice now for this very reason. I am disappointed on the lack of progress on this issue!


Submitted On 23-JAN-2008
joegood
This problem also seems to exist on the "Java Desktop", otherwise known as a skinned version of GNOME.  I wish my customer didn't use Solaris, but they do AND they use CDE which is ancient.

Please SUN, fix YOUR JRE to work on YOUR OS and YOUR desktop environment.

Thanks


Submitted On 29-FEB-2008
Even 4 is nogood. 
Please correct it immediately. 


Submitted On 29-FEB-2008
Even 4 is nogood. 
Please correct it immediately. 


Submitted On 21-MAR-2008
trusted_uniks
Another vote here.  Customer uses CDE and we're unable to deploy our app because of this bug.  Please fix!


Submitted On 28-MAR-2008
dstrong
One workaround outside of java is to reconfigure the window manager. CDE toolbar offers the ability to configure aspects of the window manager's behavior.

The toolbar has a Tools Desktop controls rollup menu with a Style Manager option. The Style Manager includes a Windows control that launches a configuration panel allowing you to configure the window focus policy.

Uncheck the "Point In Window To Make Active" box. Uncheck the "Raise Window When Made Active" box.


Submitted On 10-JUN-2008
Robby_Razzbag
This bug is wack! Take it out!


Submitted On 15-FEB-2009
2005-04-27
Nearly 4 years
Is this really "in progress"? 


Submitted On 20-JUL-2009
MEBoyce
I can't tell if there's a newer version of this ticket, but I believe I'm experiencing the same behavior on mwm on Linux.  I'd love to be able to switch to a more modern window manager, but I'm not able to require that of my customer.



PLEASE NOTE: JDK6 is formerly known as Project Mustang