Bug 480550 - Floating panel gets confused when window snap zone is larger than the screen edge snap zone
Summary: Floating panel gets confused when window snap zone is larger than the screen ...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-30 16:52 UTC by John Dykes
Modified: 2024-07-05 12:16 UTC (History)
2 users (show)

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


Attachments
Panel rapid animation behaviour (1.25 MB, video/webm)
2024-01-30 16:52 UTC, John Dykes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Dykes 2024-01-30 16:52:04 UTC
Created attachment 165356 [details]
Panel rapid animation behaviour

SUMMARY
In system settings under window behaviour, in the Movement tab, we can set the size of the snap zone for both the "screen edge snap zone" and the "window snap zone". The panel seems to be considered both a window and a screen edge for the purposes of this setting.

Since the floating panel can move, this can cause issues when the window snap zone is larger than the screen edge snap zone. In particular the floating dock goes back and forth between floating and attaching to the screen quickly.

I'm not sure if there's any reason why someone would want the window snap zone to be larger than the screen edge snap zone, but it could happen accidentally. For example if you increase the window snap zone while leaving the screen edge snap zone to its default value, which is how I noticed it.

Could probably fix this by making the panel only count as only a screen edge, not a window.

STEPS TO REPRODUCE
1. Go to System Settings > Window Behaviour > Movement
2. Set screen edge snap zone to some value smaller than the window snap zone (say 15 px and 30 px)
3. Move a window close to the floating panel

OBSERVED RESULT
The panel attaches and floats from the edge of the screen in quick succession

EXPECTED RESULT
The panel only attaches once to the screen

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 39
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.0
Kernel Version: 6.6.13-200.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6750 XT

ADDITIONAL INFORMATION
Comment 1 Marco Martin 2024-07-05 12:16:33 UTC
Git commit f7ee03d065b4e293746248f749a7965c4321b1cb by Marco Martin.
Committed on 05/07/2024 at 12:16.
Pushed by mart into branch 'master'.

Refactor floating panels

* Floating panels are always big enough to fit the floating version
* they never move during animations
* when they unfloat the masks get updated so that the extra area is completely hidden
* the exclusive zone never changes and follows the unfloated geometry
* maximize window animations are better, won't resize the window twice anymore
* unfloating animation is smoother now

depends from https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2309,
https://invent.kde.org/frameworks/ksvg/-/merge_requests/50,
https://invent.kde.org/plasma/libplasma/-/merge_requests/1166
and https://invent.kde.org/plasma/libplasma/-/merge_requests/1148
Related: bug 485648, bug 483346

M  +1    -0    shell/autotests/CMakeLists.txt
M  +19   -9    shell/panelshadows.cpp
M  +2    -1    shell/panelshadows_p.h
M  +81   -45   shell/panelview.cpp
M  +0    -1    shell/panelview.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/f7ee03d065b4e293746248f749a7965c4321b1cb