Bug 472909 - Kickoff is taking focus away after being closed with meta key.
Summary: Kickoff is taking focus away after being closed with meta key.
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: 5.27.7
Platform: Arch Linux Linux
: VHI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 472935 472947 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-08-02 04:56 UTC by notmyfirstrealname
Modified: 2024-02-06 08:14 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.7.1


Attachments
Loosing focus on closing by meta key (3.62 MB, video/mp4)
2023-08-02 05:07 UTC, notmyfirstrealname
Details

Note You need to log in before you can comment on or make changes to this bug.
Description notmyfirstrealname 2023-08-02 04:56:48 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.  Press meta key, kickoff gets opened.
2.  Press meta key again, kickoff gets closed.

OBSERVED RESULT

After kickoff was closed, focus does not return to the main window, it seems focus is retained by the panel.
Although it works as normal when using mouse click or escape key. It is also happening on digital clock widget.

EXPECTED RESULT
1. Press meta key to open kickoff, kickoff gets opened.
2. Press meta key to close kickoff, kickoff get closed.
3. Focus returns to main window.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION

Kernel Version: 6.4.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 6600H with Radeon Graphics
Memory: 7.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics with Discrete Nvidia Graphics
Manufacturer: LENOVO
Product Name: 82SB
System Version: IdeaPad Gaming 3 15ARH7
Comment 1 notmyfirstrealname 2023-08-02 05:07:05 UTC
Created attachment 160677 [details]
Loosing focus on closing by meta key
Comment 2 serfreeman1337 2023-08-02 08:05:10 UTC
Can confirm.

Reverting this commit solved the issue: 
https://invent.kde.org/plasma/plasma-desktop/-/commit/648e10cea66926e93b52b9a7e0cc65b4055448e6
Comment 3 Nate Graham 2023-08-02 18:48:09 UTC
Cannot reproduce on Plasma 6.
Comment 4 Nate Graham 2023-08-02 19:47:18 UTC
*** Bug 472935 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2023-08-02 19:48:01 UTC
Raising priority due to the visibility of the issue and how often it will affect people, despite its relatively minor effect.
Comment 6 Nate Graham 2023-08-03 19:22:04 UTC
*** Bug 472947 has been marked as a duplicate of this bug. ***
Comment 7 Fushan Wen 2023-08-04 14:07:01 UTC
Git commit d9f39abdb402a81465dca79c791a229778e97efb by Fushan Wen.
Committed on 04/08/2023 at 16:06.
Pushed by fusionfuture into branch 'Plasma/5.27'.

Panel: fix applet not returning focus after pressing applet shortcut

When applet shortcut is pressed for the first time, panel also gets
activated, but the status will change to RequiresAttentionStatus after
applet also gets activated later. When applet is activated, panel status
is not AcceptingInputStatus but RequiresAttentionStatus, so
unconditionally changing to AcceptingInputStatus when the current status
is not AcceptingInputStatus is wrong.
FIXED-IN: 5.27.8

M  +4    -2    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/d9f39abdb402a81465dca79c791a229778e97efb
Comment 8 Fushan Wen 2023-08-04 14:08:54 UTC
Git commit 81e118150c12d2c6481e71feebfc9a34710c057a by Fushan Wen.
Committed on 04/08/2023 at 16:08.
Pushed by fusionfuture into branch 'master'.

Panel: fix applet not returning focus after pressing applet shortcut

When applet shortcut is pressed for the first time, panel also gets
activated, but the status will change to RequiresAttentionStatus after
applet also gets activated later. When applet is activated, panel status
is not AcceptingInputStatus but RequiresAttentionStatus, so
unconditionally changing to AcceptingInputStatus when the current status
is not AcceptingInputStatus is wrong.
FIXED-IN: 5.27.8


(cherry picked from commit d9f39abdb402a81465dca79c791a229778e97efb)

M  +4    -2    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/81e118150c12d2c6481e71feebfc9a34710c057a
Comment 9 Bug Janitor Service 2024-01-05 12:34:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1961
Comment 10 Fushan Wen 2024-01-05 16:45:38 UTC
Git commit 599df6fd3a9e6fb562574391f4b47330a178b780 by Fushan Wen.
Committed on 05/01/2024 at 17:45.
Pushed by fusionfuture into branch 'master'.

Panel: fix connection target for onActivated on X11

It needs Containment instead of ContainmentItem.
On Wayland the focus restoration is done in other places.

M  +4    -4    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/599df6fd3a9e6fb562574391f4b47330a178b780
Comment 11 Fushan Wen 2024-01-07 10:47:45 UTC
Git commit 5b7fa25b3d78a232829f7063a85408eb5a682d80 by Fushan Wen.
Committed on 07/01/2024 at 05:01.
Pushed by fusionfuture into branch 'master'.

appiumtests: add test for bug 472909

M  +5    -1    appiumtests/CMakeLists.txt
A  +98   -0    appiumtests/bug472909.py
A  +42   -0    appiumtests/resources/bug472909_activewindow.py

https://invent.kde.org/plasma/plasma-desktop/-/commit/5b7fa25b3d78a232829f7063a85408eb5a682d80
Comment 12 Bug Janitor Service 2024-02-05 14:38:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3868
Comment 13 Marco Martin 2024-02-06 08:13:40 UTC
Git commit 6bde0db646591652628416a99e6ca29d5b573617 by Marco Martin.
Committed on 06/02/2024 at 08:13.
Pushed by mart into branch 'master'.

Fix Panel renouncing focus

On x11, removing the acceptfocus doesn't actually remove the focus from
the window
Use also here m_corona->restorePreviousWindow() to focus the old window

This is a more effective bugfix thanthe ugly workaround present in the
Panel.qml shell package

See https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2026

M  +4    -2    shell/panelview.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/6bde0db646591652628416a99e6ca29d5b573617
Comment 14 Marco Martin 2024-02-06 08:14:51 UTC
Git commit 541056c8cd251a3efc2d13ab0638216253bd6ca4 by Marco Martin.
Committed on 06/02/2024 at 08:14.
Pushed by mart into branch 'Plasma/6.0'.

Fix Panel renouncing focus

On x11, removing the acceptfocus doesn't actually remove the focus from
the window
Use also here m_corona->restorePreviousWindow() to focus the old window

This is a more effective bugfix thanthe ugly workaround present in the
Panel.qml shell package

See https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2026

M  +4    -2    shell/panelview.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/541056c8cd251a3efc2d13ab0638216253bd6ca4