-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
5.0
-
x86
-
linux
FULL PRODUCT VERSION :
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Fedora Linux 2.6.11-1.14_FC3 #1
Redhat Linux 2.4.21-4.ELsmp
EXTRA RELEVANT SYSTEM CONFIGURATION :
X-Window managers tested: KDE 3.3, GNOME 2.8, FVWM 2.4
X-Windows tested: x.org 6.8.2 , XFree86 4.3
A DESCRIPTION OF THE PROBLEM :
Neither the setLocationRelativeTo() in java.awt.Window nor the JDialog is working properly from the bottom screen when a vertically aligned Xinerama configuration is used (e.g. "Screen1" Above "Screen0"). In this case, the pop-up window always goes to the corresponding upper screen instead of near the parent window. It works fine with only horizontally aligned Xinerama or the upper screen(s) of vertical layout. The same source code was tested against JDK 1.4.x and worked perfectly.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set Xinerama in the XF86Config or xorg.conf as:
Section "ServerLayout"
Identifier "dual-head configuration"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" Above "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Then, try the provided sample running from the lower screen of multi-head display.
i
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The pop-up window should attach to its parent window or near it.
ACTUAL -
The pop-up window goes to top of the upper screen, instead.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error message.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
mport javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class DialogTester extends JFrame
{
public DialogTester()
{
super( "DialogTester" );
super.addWindowListener(
new WindowAdapter(){
public void windowClosing( WindowEvent e )
{
System.exit(0);
}
}
);
setLayout(new BorderLayout());
JButton b = new JButton( "display dialog" );
b.addActionListener( new ActionListener(){
public void actionPerformed( ActionEvent e )
{
JDialog dlg = new JDialog( DialogTester.this, "TestDialog");
dlg.setPreferredSize(new Dimension(100, 50));
dlg.setLayout( new BorderLayout() );
JLabel l = new JLabel( "Test Label" );
l.setBackground( Color.red );
dlg.add( l, BorderLayout.CENTER );
dlg.pack();
dlg.setVisible(true);
}
});
add( b, BorderLayout.CENTER );
}
public static void main( String[] args )
{
DialogTester t = new DialogTester();
t.pack();
t.setVisible(true);
}
}
---------- END SOURCE ----------
###@###.### 2005-06-24 09:42:25 GMT
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Fedora Linux 2.6.11-1.14_FC3 #1
Redhat Linux 2.4.21-4.ELsmp
EXTRA RELEVANT SYSTEM CONFIGURATION :
X-Window managers tested: KDE 3.3, GNOME 2.8, FVWM 2.4
X-Windows tested: x.org 6.8.2 , XFree86 4.3
A DESCRIPTION OF THE PROBLEM :
Neither the setLocationRelativeTo() in java.awt.Window nor the JDialog is working properly from the bottom screen when a vertically aligned Xinerama configuration is used (e.g. "Screen1" Above "Screen0"). In this case, the pop-up window always goes to the corresponding upper screen instead of near the parent window. It works fine with only horizontally aligned Xinerama or the upper screen(s) of vertical layout. The same source code was tested against JDK 1.4.x and worked perfectly.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set Xinerama in the XF86Config or xorg.conf as:
Section "ServerLayout"
Identifier "dual-head configuration"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" Above "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Then, try the provided sample running from the lower screen of multi-head display.
i
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The pop-up window should attach to its parent window or near it.
ACTUAL -
The pop-up window goes to top of the upper screen, instead.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error message.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
mport javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class DialogTester extends JFrame
{
public DialogTester()
{
super( "DialogTester" );
super.addWindowListener(
new WindowAdapter(){
public void windowClosing( WindowEvent e )
{
System.exit(0);
}
}
);
setLayout(new BorderLayout());
JButton b = new JButton( "display dialog" );
b.addActionListener( new ActionListener(){
public void actionPerformed( ActionEvent e )
{
JDialog dlg = new JDialog( DialogTester.this, "TestDialog");
dlg.setPreferredSize(new Dimension(100, 50));
dlg.setLayout( new BorderLayout() );
JLabel l = new JLabel( "Test Label" );
l.setBackground( Color.red );
dlg.add( l, BorderLayout.CENTER );
dlg.pack();
dlg.setVisible(true);
}
});
add( b, BorderLayout.CENTER );
}
public static void main( String[] args )
{
DialogTester t = new DialogTester();
t.pack();
t.setVisible(true);
}
}
---------- END SOURCE ----------
###@###.### 2005-06-24 09:42:25 GMT