Bug 500580

Summary: Cannot close widgets after closing a context menu by clicking on the desktop
Product: [Plasma] plasmashell Reporter: padurean.tudor11
Component: PanelAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: abhi.abc16, crptdngl71, cwo.kde, nate, niccolo.venerandi, wears.monarch_5c, wlodzimierz.ciesielski
Priority: NOR    
Version First Reported In: 6.3.1   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.4.0
Sentry Crash Report:

Description padurean.tudor11 2025-02-22 16:30:50 UTC
SUMMARY
Cannot close widgets after closing a context menu by clicking on the desktop. I was able to reproduce this in the application launcher and the kde connect widget.

STEPS TO REPRODUCE
1. Open a widget, for example the application launcher
2. Open a context menu, for example by right-clicking on an app icon
3. Close the menu by clicking on the desktop (does not happen if clicking on a window)
4. The context menu closes, but now the application launcher will not close (unless I click on it's icon in the panel)

OBSERVED RESULT
The widget no longer closes, even if other widgets are activated.

EXPECTED RESULT
The widget should close if you click outside it's "window".

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Comment 1 cwo 2025-02-22 18:32:29 UTC
Can reproduce.
Comment 2 cwo 2025-02-24 15:47:25 UTC
*** Bug 500675 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2025-02-27 13:36:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1279
Comment 4 Niccolò Venerandi 2025-03-11 15:56:29 UTC
Git commit f97f985d2d9362dd0333c085e6b92f561f8bcff1 by Niccolò Venerandi.
Committed on 11/03/2025 at 15:56.
Pushed by niccolove into branch 'master'.

Check AppletPopup visibility conditions whenever focus switches

The logic behind whether an AppletPopup should switch depends on
the active focus window. However, it is run only when the popup
itself loses focus. By running it each time the active focus
window changes, we make sure the popup never remains stuck open.

M  +5    -5    src/plasmaquick/appletpopup.cpp
M  +1    -1    src/plasmaquick/appletpopup.h

https://invent.kde.org/plasma/libplasma/-/commit/f97f985d2d9362dd0333c085e6b92f561f8bcff1
Comment 5 Nate Graham 2025-04-02 21:20:28 UTC
*** Bug 502336 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2025-04-14 20:21:35 UTC
*** Bug 500152 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2025-05-06 15:17:28 UTC
*** Bug 503822 has been marked as a duplicate of this bug. ***