Bug 487161 - Show alternatives popup can lose focus but not disappear, and then it won't disappear until you manually re-focus it and make it lose focus again
Summary: Show alternatives popup can lose focus but not disappear, and then it won't d...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 6.0.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-17 18:49 UTC by Waqar Ahmed
Modified: 2024-06-26 15:08 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Waqar Ahmed 2024-05-17 18:49:08 UTC
STEPS TO REPRODUCE
1. Right click the panel and click "Show Alternatives..."
2. Press Escape, click elsewhere to make it go away

OBSERVED RESULT

It doesn't hide. The only way to make it hide is by selecting an option

EXPECTED RESULT

It hides on escape or a click outside the popup
SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.6.30-2-MANJARO (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 cwo 2024-06-18 21:41:44 UTC
I have found a way to cleanly reproduce this on current Neon/Plasma 6.2 Dev, including with an (almost) fresh profile.

STEPS TO REPRODUCE

1. Right-click a panel, Show Panel Configuration.
2. Right-click a widget that has alternatives (like kickoff), select "Show Alternatives".
3. Leaving the "Alternative widgets" interface open, click "Done" on the Panel Settings menu. 

After that, the "Alternative widgets" interface remains open and does not close if you click elsewhere, the way it usually does. Picking one of the options makes it go away, and I've found it seems to become unstuck over time and will close at some point.
Comment 2 Firlaev-Hans 2024-06-20 10:35:52 UTC
Can confirm on Plasma 6.1
Comment 3 Nate Graham 2024-06-20 18:30:37 UTC
This works as expected for me on Wayland. Are all affected people using X11?
Comment 4 Firlaev-Hans 2024-06-20 19:03:40 UTC
(In reply to Nate Graham from comment #3)
> This works as expected for me on Wayland. Are all affected people using X11?

No, I'm on Wayland. Did you follow the steps from the second comment?
Open "Show alternatives" while in edit mode, then exit edit mode with it still open, and it won't go away when you click anywhere else unless you focus it again once.

It doesn't happen when you do it the other way around, i. e. opening "Show alternatives" in normal mode and then *entering* edit mode, which makes the menu go away as expected.
Comment 5 Firlaev-Hans 2024-06-20 19:06:14 UTC
*actually just plain edit mode doesn't trigger it, you have to be in panel configuration mode.
Comment 6 Firlaev-Hans 2024-06-20 19:19:26 UTC
Oh, and another thing I found (sorry for pinging y'all thrice in a row):
This also ONLY happens when you click "show alternatives" on the popup menu that you get when you hover over the plasmoid in panel edit mode, not when invoking it via the right click menu. This is weird.
Comment 7 Nate Graham 2024-06-20 19:26:26 UTC
I can reproduce the issue with it with panel configuration mode open, but that seems different from what Waqar is reported.

In both cases I suspect it's lost focus without closing for some reason.

If you click on its header to give it focus again, will it then close when you hit the Esc key or click elsewhere to make it lose focus in the way it expected?
Comment 8 cwo 2024-06-20 19:50:13 UTC
Yes, clicking the header of the popup makes it go away again if I then click outside the popup or press escape. Lost focus without closing seems reasonable.

That's for the replication steps I outlined in comment 2. I don't think anyone has replicated the precise steps that Waqar gave; mine was an alternate way to get the same symptoms. Maybe I should have been more explicit about that.
Comment 9 Bug Janitor Service 2024-06-26 08:22:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4485
Comment 10 Niccolò Venerandi 2024-06-26 08:27:24 UTC
Git commit 7b875528ad2b23a5d63e93cd40c2ca0b946f2e47 by Niccolò Venerandi, on behalf of Niccolo Venerandi.
Committed on 26/06/2024 at 08:26.
Pushed by niccolove into branch 'master'.

Do not hide panel settings when a panel-parented dialog takes focus

This avoids the Alternative Widgets dialog to remain stuck open
when you close edit mode with it open.

M  +11   -0    shell/panelconfigview.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/7b875528ad2b23a5d63e93cd40c2ca0b946f2e47
Comment 11 Niccolò Venerandi 2024-06-26 15:06:10 UTC
Git commit 3acaa98ff89120cc93cdcb87210c061a7de2a004 by Niccolo Venerandi.
Committed on 26/06/2024 at 15:05.
Pushed by niccolove into branch 'Plasma/6.1'.

Do not hide panel settings when a panel-parented dialog takes focus

This avoids the Alternative Widgets dialog to remain stuck open
when you close edit mode with it open.

M  +11   -0    shell/panelconfigview.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/3acaa98ff89120cc93cdcb87210c061a7de2a004