Bug 443631

Summary: Popup-palette won't disappear when pressing keyboard shortcut the second time
Product: [Applications] krita Reporter: Protoniv <ss93078>
Component: Shortcuts and Canvas Input SettingsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version: 5.0.0-beta2   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: 5.0-beta2 Popup-palette behavior

Description Protoniv 2021-10-12 08:55:00 UTC
Created attachment 142360 [details]
5.0-beta2 Popup-palette behavior

SUMMARY
The Popup-palette can activate/deactivate by Right-click or assigned keyboard shortcut.
But in Beta2, keyboard shortcut can only activate the Popup-palette.
This also happens in 5.1.0-prealpha-45ea10672e

STEPS TO REPRODUCE
1. Canva Input Setting > Show Popup Widget > Assign Key Combination (Z for example)
2. Hit Z to activate/deactivate Popup-palette
3. 

OBSERVED RESULT
Popup-palette won't deactivate when pressing keyboard shortcut.

EXPECTED RESULT
Popup-palette activate/deactivate as Right-click did.

SOFTWARE/OS VERSIONS
Windows: Windows10 20H2
Linux/KDE Plasma: Opensuse 15.3 / Plasma 5.18

ADDITIONAL INFORMATION
Comment 1 sh_zam 2021-10-21 15:37:52 UTC
Git commit a056ae20fb5732326b8ac102df3fca4e615dc458 by Sharaf Zaman.
Committed on 21/10/2021 at 15:35.
Pushed by szaman into branch 'master'.

Bugfix: Popup palette doesn't disappear when using keyboard shortcut

For pointer events we hide it in KisInputManager::eventFilterBeginImpl,
so we needed to handle keyboard events and SPen events
explicitly (like in 443600).

Perhaps a toggle function would suit more?

M  +9    -6    libs/ui/input/KisPopupWidgetAction.cpp

https://invent.kde.org/graphics/krita/commit/a056ae20fb5732326b8ac102df3fca4e615dc458
Comment 2 Protoniv 2021-10-30 04:51:20 UTC
Hi, it has been resolved in 5.1.0-prealpha, but can still be reproduced in 5.0.0-beta2-84eaf3c867.
Tested on Windows 10 20H2, portable ver.
Thank you :)
Comment 3 sh_zam 2021-11-08 10:19:09 UTC
Git commit ee74680b5c221d3ca42edea85b7329d5fb18b533 by Sharaf Zaman.
Committed on 08/11/2021 at 10:10.
Pushed by szaman into branch 'krita/5.0'.

Bugfix: Popup palette doesn't disappear when using keyboard shortcut

For pointer events we hide it in KisInputManager::eventFilterBeginImpl,
so we needed to handle keyboard events and SPen events
explicitly (like in 443600).

Perhaps a toggle function would suit more?
(cherry picked from commit a056ae20fb5732326b8ac102df3fca4e615dc458)

M  +9    -6    libs/ui/input/KisPopupWidgetAction.cpp

https://invent.kde.org/graphics/krita/commit/ee74680b5c221d3ca42edea85b7329d5fb18b533