lxqt-panel
lxqt-panel copied to clipboard
mainmenu: Remove shortcut popup delay
This was introduced as workaround for "menu not in focus after shortcut activation". But the root cause of the problem was probably in lxqt-globalkeys, where the signal was triggered on KeyPress instead of KeyRelease <- this was fixed recently. Now the delay is pointless.
Closes #1770
Works fine.
The above-mentioned problem happens randomly but, IMO, since it has never happened here with the delay, it shows that the delay is needed.
I didn't notice any misbehavior until now here.
It may depend on WM and/or its animations. I can easily reproduce the problem with the patch + KWin.
I don't think lxqt-globalkeys caused the focus problem in the first place. It may be related to Qt and how it shows menus. In the case of lxqt-panel, there's no focus when the menu is going to be shown, and that may contribute to the problem.
EDIT: I can reproduce the issue with all LXQt themes and all widget styles.
Kwin too here. Did you test a shorter delay? But to ship it in 1.1.0 it has to be 100% ok for everyone.
Did you test a shorter delay?
The 200-ms delay in the master is the best. With 100 ms, it happens rarely. Without a delay, it happens most of the time here.
IMO, until we find the real cause and eradicate the problem — or at least until we find an efficient workaround without a delay — the current delay is the safest workaround.
IMO, until we find the real cause and eradicate the problem — or at least until we find an efficient workaround without a delay — the current delay is the safest workaround.
I think the changes I did in PR #1698 maybe uncover the root cause of all this, I will dig deeper and see if we can use QKeySequence everywhere instead of QString of keyboard shortcuts.
I will dig deeper and see if we can use
QKeySequenceeverywhere instead ofQStringof keyboard shortcuts.
Unfortunately not, it is more constraining and it does not solve the fact that we cannot use the Super key in key combinations as it is considered to be a normal key, it took me a while to understand that QKeySequence cannot encode e.g. Ctrl+Super+A+B.