Bug 511187

Summary: Cannot dismiss "Show alternatives..." popup of widgets placed on desktop by clicking outside them
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: ContainmentAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aspotashev, equeim, kde, nate, notmart
Priority: HI    
Version First Reported In: 6.5.0   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Patrick Silva 2025-10-27 00:26:49 UTC
STEPS TO REPRODUCE
1. add a System Monitor widget to desktop
2. right-click on the added widget and choose "Show alternatives..."
3. click on desktop

OBSERVED RESULT
"Show alternatives..." popup is still open

EXPECTED RESULT
"Show alternatives..." popup is dismissed

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Graphics Platform: Wayland

ADDITIONAL INFORMATION
I can dismiss the "Show alternatives..." popup of widgets placed on panel by clicking outside them.
Comment 1 Nate Graham 2025-10-29 19:33:07 UTC
Clicking on the widget or pressing the Escape key don't work, either.
Comment 2 Nate Graham 2025-10-29 19:33:09 UTC
*** Bug 507646 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2025-10-29 19:33:39 UTC
*** Bug 511335 has been marked as a duplicate of this bug. ***
Comment 4 equeim 2025-12-28 20:03:15 UTC
(In reply to Nate Graham from comment #1)
> Clicking on the widget or pressing the Escape key don't work, either.

Pressing escape works after you click back on the popup.

Also this bug affects any other widget popups when they are placed on the desktop, e.g. application launcher.
Comment 5 Bug Janitor Service 2025-12-28 20:05:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1410
Comment 6 Nicolas Fella 2025-12-30 13:38:31 UTC
Git commit fcaa31ee87b2a9a23dd9303e2d3162801e489d5f by Nicolas Fella, on behalf of Alexey Rochev.
Committed on 30/12/2025 at 13:04.
Pushed by nicolasfella into branch 'master'.

Fix hideOnWindowDeactivate in Dialog and AppletPopup

Commit 65b00fa6b7c9f2942979f3fcafe5f03d3f4ebbbd brought QuickViewSharedEngine to libplasma from KDeclarative,
but also changed the logic of hiding of Dialog on focus change from checking for QuickViewSharedEngine to SharedQmlEngine, which is likely a typo.
QWindow can never be cast to SharedQmlEngine (I think?) so this qobject_cast always returns nullptr.

M  +2    -2    src/plasmaquick/appletpopup.cpp
M  +2    -2    src/plasmaquick/dialog.cpp

https://invent.kde.org/plasma/libplasma/-/commit/fcaa31ee87b2a9a23dd9303e2d3162801e489d5f
Comment 7 Nicolas Fella 2025-12-30 13:39:03 UTC
Git commit 90b7b1d050a404ed1b47d128c406e8fb8a81331e by Nicolas Fella, on behalf of Alexey Rochev.
Committed on 30/12/2025 at 13:38.
Pushed by nicolasfella into branch 'Plasma/6.5'.

Fix hideOnWindowDeactivate in Dialog and AppletPopup

Commit 65b00fa6b7c9f2942979f3fcafe5f03d3f4ebbbd brought QuickViewSharedEngine to libplasma from KDeclarative,
but also changed the logic of hiding of Dialog on focus change from checking for QuickViewSharedEngine to SharedQmlEngine, which is likely a typo.
QWindow can never be cast to SharedQmlEngine (I think?) so this qobject_cast always returns nullptr.
(cherry picked from commit fcaa31ee87b2a9a23dd9303e2d3162801e489d5f)

M  +2    -2    src/plasmaquick/appletpopup.cpp
M  +2    -2    src/plasmaquick/dialog.cpp

https://invent.kde.org/plasma/libplasma/-/commit/90b7b1d050a404ed1b47d128c406e8fb8a81331e