Bug 493439 - Close Kickoff popup if user initiates Sleep from Kickoff, so it doesn't remain open after wake-up when the screen locker is disabled
Summary: Close Kickoff popup if user initiates Sleep from Kickoff, so it doesn't remai...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) widget (show other bugs)
Version: 6.1.3
Platform: Arch Linux Linux
: VLO wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-09-21 14:00 UTC by DeKay
Modified: 2024-09-25 19:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DeKay 2024-09-21 14:00:19 UTC
SUMMARY
When I select Sleep from the Kickoff window, it sleeps as it should. However, the Kickoff window is kept open and when the PC is woken, the Sleep button still has focus. If the first thing you do is hit the spacebar or click the mouse (assuming the cursor hasn't moved off the button) after waking, the PC will go to sleep again. Grrrr.

There is no good reason to have the Kickoff menu kept open when the PC wakes back up, so automatically closing it as the PC is put to Sleep would solve this frustrating problem.

STEPS TO REPRODUCE
1. Sleep the PC by opening the Kickoff menu and clicking on sleep
2. Wake the PC by hitting a key or clicking left mouse button without moving the mouse around
3. Hit the space bar or click left mouse button.

OBSERVED RESULT
The PC will be put to sleep again immediately after being woken. This was likely unintended and very frustrating.

EXPECTED RESULT
The Kickoff Window should be closed so the user can get back to what they were doing when they put the PC to sleep.

Note that even if the mouse moves a bit off the Sleep button into a grey area of the Kickoff menu, the button won't show focus but clicking left mouse will activate Sleep anyway. Presumably this is because that was the last button focused (if it matters, I am using "Focus Follows Mouse").

SOFTWARE/OS VERSIONS
Linux: 6.9.10-arch1-1
KDE Plasma Version: 6.1.3-1
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2-1
Comment 1 Justin Zobel 2024-09-22 06:14:13 UTC
Focus follows mouse doesn't have any effect on this.

I can confirm the issue and I think it's definitely an inconvenience (minor though) as some people will wake their device up with their space bar as it's large and easy to reach/press.
Comment 2 Nate Graham 2024-09-23 17:23:12 UTC
I assume you have the lock screen turned off too, such that waking up the system doesn't prompt for unlock? If so, I can also reproduce the issue. When I do have screen locking turned on, unlocking has the effect of closing Kickoff.
Comment 3 DeKay 2024-09-23 19:13:43 UTC
(In reply to Nate Graham from comment #2)
> I assume you have the lock screen turned off too, such that waking up the
> system doesn't prompt for unlock? If so, I can also reproduce the issue.
> When I do have screen locking turned on, unlocking has the effect of closing
> Kickoff.

You are correct. I have the lock screen turned off.
Comment 4 Bug Janitor Service 2024-09-23 22:03:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2543
Comment 5 DeKay 2024-09-23 22:21:48 UTC
A big Thank You to Christoph Wolk for developing a fix for this issue so quickly!!!
Comment 6 cwo 2024-09-25 16:40:06 UTC
Git commit 6d77bf248bd67b7c0740aca8e6aa711398cad515 by Christoph Wolk.
Committed on 25/09/2024 at 16:26.
Pushed by cwo into branch 'master'.

applets/kickoff: close on session/power action

The power and session actions currently do not explicitly close kickoff
like starting an application does. In most cases this has no consequence
as kickoff will be closed by the session/power action itself or its
consequences. There are some, though, that do not necessarily do so; one
of them is sleep if the computer is configured to not lock the screen on
waking (otherwise locking would close kickoff).

This change makes the power/session buttons behave like regular entries
and close the popup when activated. The user can still prevent this by
pinning kickoff.

M  +6    -1    applets/kickoff/package/contents/ui/LeaveButtons.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/6d77bf248bd67b7c0740aca8e6aa711398cad515
Comment 7 cwo 2024-09-25 17:14:39 UTC
Git commit da5fc5cdecc35da5db2084d7b1d2dec2ed87544e by Christoph Wolk.
Committed on 25/09/2024 at 16:57.
Pushed by cwo into branch 'Plasma/6.2'.

applets/kickoff: close on session/power action

The power and session actions currently do not explicitly close kickoff
like starting an application does. In most cases this has no consequence
as kickoff will be closed by the session/power action itself or its
consequences. There are some, though, that do not necessarily do so; one
of them is sleep if the computer is configured to not lock the screen on
waking (otherwise locking would close kickoff).

This change makes the power/session buttons behave like regular entries
and close the popup when activated. The user can still prevent this by
pinning kickoff.


(cherry picked from commit 6d77bf248bd67b7c0740aca8e6aa711398cad515)

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>

M  +6    -1    applets/kickoff/package/contents/ui/LeaveButtons.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/da5fc5cdecc35da5db2084d7b1d2dec2ed87544e