I tried making a Java GUI app to see your problem and I can't duplicate it. What is the Java program you are running? What browser are you dragging over the Java program.
If I open a menu on my Java GUI app, the menu closes immediately when I click on a browser to drag it over the Java GUI app. The behavior is the same under wayland or X11.
Please try the example app above and see if it has the same problem. You can run it with the command line:
java GUI.java
If I open a menu on my Java GUI app, the menu closes immediately when I click on a browser to drag it over the Java GUI app. The behavior is the same under wayland or X11.
Code:
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class GUI extends JFrame { public GUI() { setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setAlwaysOnTop(true); JMenuBar mb = new JMenuBar(); setJMenuBar(mb); JMenu menu = new JMenu("Menu"); mb.add(menu); menu.add("First"); menu.add("Second"); menu.add("Third"); menu.add("Fourth"); JPanel panel = new JPanel(); panel.setPreferredSize(new Dimension(400,300)); add(panel,BorderLayout.CENTER); pack(); setVisible(true); } public static void main(String[] args) { EventQueue.invokeLater(() -> new GUI()); }}java GUI.java
Statistics: Posted by knute — Thu May 23, 2024 9:34 pm