Closed tsujan closed 8 months ago
I should have added this to the "Cons" list:
Sadly, there's an inconsistency (or a group of related bugs) in Qt: Although ContextMenuOnMouseRelease
exists, Qt doesn't treat it as a real parameter. Instead, it assumes that it should be true
only under MS Windows.
For example, under Linux, QAbstractItemView
will activate items on right clicking by default if they're activated by single clicking. This behavior can be seen in Qt's default file dialog. Some apps (like libfm-qt
) may avoid it by chance; others just inherit it. The fact that all codes could override it wouldn't make it less serious.
I noticed that multiple selection of files (pressing ctrl) is weird with this setting in single click mode: it opens the file too.
I noticed that multiple selection of files (pressing ctrl) is weird with this setting
In the one month that I used it, I saw no problem other than what I mentioned above. But I'd also applied two other patches related to it (although none of them was in libfm-qt).
Anyway, I stopped using it after a month, because Qt itself wasn't self-consistent about it (→ my previous comment). Therefore, I see no reason to keep this PR open. Its comments can serve as a source of info though
Although I closed this, it's a lifesaver on Wayland :) Because it's the only workaround for an old Qt issue (from which Qt6 suffers too). See https://github.com/tsujan/Kvantum/discussions/911 for the reason.
In short, only with context menus being shown on releasing mouse button, if an inactive Qt window is right clicked on Wayland, it'll be properly activated before showing a context menu.
It brings the behavior of MS Windows to Qt apps. The key is
context_menu_on_mouse_release
under the[General]
section of~/.config/lxqt/lxqt.conf
, and it can betrue
orfalse
(false
by default).Pros:
Cons:
libqtxdg
(inherited from a similar problem in Qt) and another one in lxqt-panel's main menu. But they can be fixed easily.NOTE: It can't be confusing to users because context menus are already shown on mouse release in notification area (an inconsistency not noticed by many).