lxqt-panel icon indicating copy to clipboard operation
lxqt-panel copied to clipboard

mainmenu: Remove shortcut popup delay

Open palinek opened this issue 3 years ago • 8 comments

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

palinek avatar Apr 08 '22 09:04 palinek

Works fine.

stefonarch avatar Apr 09 '22 08:04 stefonarch

The above-mentioned problem happens randomly but, IMO, since it has never happened here with the delay, it shows that the delay is needed.

tsujan avatar Apr 14 '22 15:04 tsujan

I didn't notice any misbehavior until now here.

stefonarch avatar Apr 14 '22 15:04 stefonarch

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.

tsujan avatar Apr 14 '22 15:04 tsujan

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.

stefonarch avatar Apr 14 '22 17:04 stefonarch

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.

tsujan avatar Apr 14 '22 18:04 tsujan

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.

AdelKS avatar Apr 16 '22 23:04 AdelKS

I will dig deeper and see if we can use QKeySequence everywhere instead of QString of 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.

AdelKS avatar Apr 17 '22 21:04 AdelKS