Bug 455398

Summary: Custom shortcut to focus a specific panel does not work
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: cyril.rossi, nate, niccolo.venerandi, notmart, qydwhotmail
Priority: NOR Keywords: regression
Version: 5.27.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.27.7

Description Patrick Silva 2022-06-16 12:09:09 UTC
STEPS TO REPRODUCE
1. right-click a panel and choose 'Enter Edit Mode'
2. click on 'More Options...'
3. set a custom keyboard shortcut - I use meta+a
4. leave edit mode
5. test your keyboard shortcut

OBSERVED RESULT
nothing happens

EXPECTED RESULT
Plasma panel configured in the steps above should be focused

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.4
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-06-16 19:53:18 UTC
Can reproduce. :( This must have broken along the way. I remember it working in the past, before we added the "cycle focus through panels" feature.
Comment 2 Bug Janitor Service 2022-09-17 11:38:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2133
Comment 3 Bug Janitor Service 2022-09-17 11:38:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1152
Comment 4 Fushan Wen 2023-07-21 19:02:05 UTC
Git commit 55a9eeba7595548e4e748d95a103813359639dff by Fushan Wen.
Committed on 21/07/2023 at 18:12.
Pushed by fusionfuture into branch 'master'.

desktoppackage: activate panel on "Activate Panel Widget" shortcut pressed

This partially reverts c89fb19673e35fc50a42a114ad3e52a503c05098 to bring
back onActivated signal required by the global shortcut.
Related: bug 352476, bug 453166
FIXED-IN: 5.26

M  +11   -0    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/55a9eeba7595548e4e748d95a103813359639dff
Comment 5 Fushan Wen 2023-07-21 19:04:09 UTC
Git commit 648e10cea66926e93b52b9a7e0cc65b4055448e6 by Fushan Wen.
Committed on 21/07/2023 at 19:03.
Pushed by fusionfuture into branch 'Plasma/5.27'.

desktoppackage: activate panel on "Activate Panel Widget" shortcut pressed

This partially reverts c89fb196 to bring
back onActivated signal required by the global shortcut.
Related: bug 352476, bug 453166
FIXED-IN: 5.27

(cherry picked from commit 55a9eeba7595548e4e748d95a103813359639dff)

M  +12   -1    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/648e10cea66926e93b52b9a7e0cc65b4055448e6
Comment 6 Fushan Wen 2023-07-21 19:06:29 UTC
Git commit 2ae02766f8784fee5dcf33bfc6ae973e367beef1 by Fushan Wen.
Committed on 21/07/2023 at 18:50.
Pushed by fusionfuture into branch 'master'.

shell: move `forceActiveFocus` to `PanelView`

This allows to focus on the first child widget in a panel by setting
containment status directly.

This adds `savePreviousWindow()` to save the previously focused window,
to be called in `PanelView::refreshStatus`. When the previous window is
not reset, calling savePreviousWindow() will not do anything, so when
there are more than one panel, it will not incorrectly save the wrong
window (panel).
Related: bug 352476, bug 453166

M  +9    -0    shell/panelview.cpp
M  +14   -22   shell/shellcorona.cpp
M  +1    -0    shell/shellcorona.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/2ae02766f8784fee5dcf33bfc6ae973e367beef1
Comment 7 Fushan Wen 2023-07-21 19:07:27 UTC
Git commit 6f0cd573dcc3634a453c8bb6b504013dc8372a95 by Fushan Wen.
Committed on 21/07/2023 at 19:06.
Pushed by fusionfuture into branch 'Plasma/5.27'.

shell: move `forceActiveFocus` to `PanelView`

This allows to focus on the first child widget in a panel by setting
containment status directly.

This adds `savePreviousWindow()` to save the previously focused window,
to be called in `PanelView::refreshStatus`. When the previous window is
not reset, calling savePreviousWindow() will not do anything, so when
there are more than one panel, it will not incorrectly save the wrong
window (panel).
Related: bug 352476, bug 453166

(cherry picked from commit 2ae02766f8784fee5dcf33bfc6ae973e367beef1)

M  +9    -0    shell/panelview.cpp
M  +14   -22   shell/shellcorona.cpp
M  +1    -0    shell/shellcorona.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/6f0cd573dcc3634a453c8bb6b504013dc8372a95