Bug 483941 - Activating a panel applet without any expanded view (like Minimize All or Show Desktop) breaks Autohide and Dodge Windows
Summary: Activating a panel applet without any expanded view (like Minimize All or Sho...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: Other Linux
: HI normal
Target Milestone: 1.0
Assignee: Niccolò Venerandi
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-03-18 20:41 UTC by Bharadwaj Raju
Modified: 2024-03-25 19:24 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bharadwaj Raju 2024-03-18 20:41:00 UTC
SUMMARY
If the panel is in Dodge Windows or Autohide mode, then clicking a widget like Minimize All or Show Desktop breaks the autohiding behavior. That is, the panel does not hide away even if the mouse is not on it, and a window is touching it.

Behavior is restored if I open and close the system tray.


STEPS TO REPRODUCE
1. Set panel to Dodge Windows or Autohide
2. Click Minimize All or Show Desktop


OBSERVED RESULT
Autohiding behavior breaks

EXPECTED RESULT
Autohiding behavior keeps working

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 39
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.1.0
Qt Version: 6.6.0
Kernel Version: 6.6.11-200.fc39.x86_64 (64-bit)
Graphics Platform: Wayland


ADDITIONAL INFORMATION
Reason why this happens: PanelView::restoreAutoHide() disables autohide if the panel's status is NeedsAttentionStatus or higher. Recently https://invent.kde.org/plasma/libplasma/-/merge_requests/1036 made a change so that when an applet is activated, the panel gets NeedsAttentionStatus.
Comment 1 Bug Janitor Service 2024-03-22 07:33:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1082
Comment 2 Nate Graham 2024-03-25 19:05:40 UTC
Git commit 6794ae6ab7c2c50f5ac57d7f32f5db1f7347201c by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 25/03/2024 at 19:05.
Pushed by ngraham into branch 'master'.

Do not activate containment when one of its applet is activated

Reasoning is that some applets use "activated" when they would to trigger
their action, e.g. the show desktop applet. If the containment (here, the
panel) also gets activated as a result, it will get mouse input and a blue
line will appear. Previously this was avoided by some hacky code that (a)
apparently was not working for some people and (b) broke auto-hide and
dodge windows after clicking on "Minimize all".

This will also allow us to delete the hack in plasma-desktop.
Related: bug 479084
FIXED-IN: 6.0.3

M  +0    -4    src/plasma/containment.cpp

https://invent.kde.org/plasma/libplasma/-/commit/6794ae6ab7c2c50f5ac57d7f32f5db1f7347201c
Comment 3 Nate Graham 2024-03-25 19:06:35 UTC
Git commit 6203530a48a46e276d8e59452d23861118c1e362 by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 25/03/2024 at 19:06.
Pushed by ngraham into branch 'master'.

Revert "Panel: Don't take keyboard focus when one of its widgets is activated"

This reverts commit 5909ac488df5fa469174387be4bb1ffe23578d0a.

This is a companion to
https://invent.kde.org/plasma/libplasma/-/merge_requests/1082, which
removes need for this hack
Related: bug 479084

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

https://invent.kde.org/plasma/plasma-desktop/-/commit/6203530a48a46e276d8e59452d23861118c1e362
Comment 4 Bug Janitor Service 2024-03-25 19:08:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2143
Comment 5 Nate Graham 2024-03-25 19:14:56 UTC
Git commit e53fd6b066d569ae8247e5565c51560ace7af078 by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 25/03/2024 at 19:06.
Pushed by ngraham into branch 'Plasma/6.0'.

Revert "Panel: Don't take keyboard focus when one of its widgets is activated"

This reverts commit 5909ac488df5fa469174387be4bb1ffe23578d0a.

This is a companion to
https://invent.kde.org/plasma/libplasma/-/merge_requests/1082, which
removes need for this hack
Related: bug 479084


(cherry picked from commit 6203530a48a46e276d8e59452d23861118c1e362)

c2994876 Revert "Panel: Don't take keyboard focus when one of its widgets is activated"

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

https://invent.kde.org/plasma/plasma-desktop/-/commit/e53fd6b066d569ae8247e5565c51560ace7af078
Comment 6 Nate Graham 2024-03-25 19:24:30 UTC
Git commit abad7a55865f8ad2e936b34b33ffa5c2fe7d5598 by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 25/03/2024 at 19:10.
Pushed by ngraham into branch 'Plasma/6.0'.

Do not activate containment when one of its applet is activated

Reasoning is that some applets use "activated" when they would to trigger
their action, e.g. the show desktop applet. If the containment (here, the
panel) also gets activated as a result, it will get mouse input and a blue
line will appear. Previously this was avoided by some hacky code that (a)
apparently was not working for some people and (b) broke auto-hide and
dodge windows after clicking on "Minimize all".

This will also allow us to delete the hack in plasma-desktop.
Related: bug 479084
FIXED-IN: 6.0.3
(cherry picked from commit 6794ae6ab7c2c50f5ac57d7f32f5db1f7347201c)

M  +0    -1    src/plasma/containment.cpp

https://invent.kde.org/plasma/libplasma/-/commit/abad7a55865f8ad2e936b34b33ffa5c2fe7d5598