-
Bug
-
Resolution: Fixed
-
P3
-
21
-
b24
-
b25
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8321007 | 21.0.3-oracle | Renjith Kannath Pariyangad | P3 | Resolved | Fixed | b01 |
JDK-8324035 | 21.0.3 | Sonia Zaldana Calles | P3 | Resolved | Fixed | b01 |
JDK-8335923 | 17.0.13-oracle | Harshitha Onkar | P3 | Resolved | Fixed | b02 |
JDK-8336744 | 17.0.13 | Matthias Baesken | P3 | Resolved | Fixed | b01 |
JDK-8337961 | 11.0.26-oracle | Harshitha Onkar | P3 | Resolved | Fixed | b01 |
JDK-8338799 | 8u441 | Renjith Kannath Pariyangad | P3 | Resolved | Fixed | b01 |
Linux with Wayland
A DESCRIPTION OF THE PROBLEM :
If using components in JPopupMenu that request/receive focus (e.g. text field or button),
then the popup is not shown. (it is made visible, but immediately hidden).
Occurs only if the popup does not fit into invoker window.
In this case a heavy-weight popup is used, which means that the popup is shown in another JWindow.
When the popup JWindow gains focus, the invoker window looses focus and closes the popup.
This is a regression in Java 21 caused by fix for
REGRESSION : Last worked in version 20
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
public class LinuxWaylandJava21PopupTest
{
public static void main( String[] args ) {
SwingUtilities.invokeLater( () -> {
JFrame frame = new JFrame( LinuxWaylandJava21PopupTest.class.getSimpleName() );
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
JButton showPopup = new JButton( "show popup" );
showPopup.addActionListener( e -> {
JPanel popupPanel = new JPanel();
popupPanel.add( new JTextField( 20 ) );
JPopupMenu popupMenu = new JPopupMenu();
popupMenu.add( popupPanel );
popupMenu.addPopupMenuListener( new PopupMenuListener() {
@Override
public void popupMenuWillBecomeVisible( PopupMenuEvent e ) {
EventQueue.invokeLater( () -> {
// focus first component in popup
popupPanel.transferFocus();
} );
}
@Override
public void popupMenuWillBecomeInvisible( PopupMenuEvent e ) {
System.out.println( "popup will become invisible" );
}
@Override
public void popupMenuCanceled( PopupMenuEvent e ) {
System.out.println( "popup canceled" );
}
} );
popupMenu.show( null, 0, showPopup.getHeight() );
} );
frame.add( showPopup );
frame.add( new JLabel( "Java version " + System.getProperty( "java.version" ) ), BorderLayout.NORTH );
frame.pack();
frame.setVisible( true );
} );
}
}
---------- END SOURCE ----------
FREQUENCY : always
- backported by
-
JDK-8321007 Popups that request focus are not shown on Linux with Wayland
- Resolved
-
JDK-8324035 Popups that request focus are not shown on Linux with Wayland
- Resolved
-
JDK-8335923 Popups that request focus are not shown on Linux with Wayland
- Resolved
-
JDK-8336744 Popups that request focus are not shown on Linux with Wayland
- Resolved
-
JDK-8337961 Popups that request focus are not shown on Linux with Wayland
- Resolved
-
JDK-8338799 Popups that request focus are not shown on Linux with Wayland
- Resolved
- relates to
-
JDK-8280993 [XWayland] Popup is not closed on click outside of area controlled by XWayland
- Resolved
-
JDK-8342096 Popup menus that request focus are not shown on Linux with Wayland
- Open
- links to
-
Commit openjdk/jdk21u-dev/fcf9ebde
-
Commit openjdk/jdk/f3ed2758
-
Commit(master) openjdk/jdk17u-dev/14e3de9c
-
Review openjdk/jdk21u-dev/155
-
Review openjdk/jdk/16636
-
Review(master) openjdk/jdk17u-dev/2723