Open yxnan opened 2 years ago
What wm is this? Looks like dwm, I'm here on awesomewm, haven't tried to reproduce yet.
What wm is this? Looks like dwm, I'm here on awesomewm, haven't tried to reproduce yet.
It's XMonad. I haven't tried awesomewm, but maybe it also has this problem
What wm is this? Looks like dwm, I'm here on awesomewm, haven't tried to reproduce yet.
It's XMonad. I haven't tried awesomewm, but maybe it also has this problem
I don't think it has that problem since by default it uses the floating layout.
Using the -Djdk.gtk.version=2
java launch argument as proposed by this comment in the JDK bug tracker seems to work around the issue, at least on i3.
I can also confirm this with i3. The launch argument trick does seem to fix the issue as well.
Environment
Describe the bug
If user clicks on the menu bar and holds the left mouse, the menu items show up, but they close immediately after the left mouse button is released. If you keep the left button pressed, the menu stays open, but the menu items cannot be selected or clicked, which causes all of the menus entirely unusable, however, the hotkeys can still be triggered so generally this is not big trouble. Also, using the Alt key can select the menubar, but cannot open the submenus.
This behavior occurs on most tiling window managers and only on them. I tried XMoand/QTile/i3wm/bspwm, all of them have the exactly same problem, whereas the program functions well in a typical full desktop environment (such as GNOME or MATE)
Maybe useful for relation
There is another JavaFX project has the very similar problem, relating issues: https://github.com/JabRef/jabref/issues/5867, and https://github.com/JabRef/jabref/issues/5526. The difference is that, only the upper half of menu is broken in JabRef, but mcaselector's menu is evenly inaccessible.
There is also a bug report in the javafx version 14: https://bugs.openjdk.java.net/browse/JDK-8251240
Personal Guess
There is a gap between the menubar and the submenu (I don't know why), so when the submenu is open, it loses the focus immediately therefore gets closed. Because in a tiling window manager, you lose the focus instantly by moving the mouse pointer outside the window, instead of by manually clicking on another window.
Tries to fix
In JabRef's issue someone mentioned a workaroud for that app (https://github.com/JabRef/jabref/issues/5526#issuecomment-547281967), to make the submenus act as a floating window instead of a regular one, thus prevents it from being organized by the layout system.
Following this idea, I wrote a ManageHook to make all of the MCA selector's window go floating by filtering out the windows where
WM_CLASS = "net.querz.mcaselector.ui.Window"
. This rule did make the Main window/About dialog/Setting utility go floating, but the menu is still broken. I also tried the classnamejavafx.scene.control.Menu
but the same.I tried using
xprop
andwmctrl -l
to find the class of the submenu but failed, simply no output, maybe in the newer JavaFX the submenu is no longer implemented as a standalone window instance (I don't write Java and cannot understand the JavaFX docs so this is only my inaccurate guess)debug.log