panelview.cpp: Move setPosition to resizePanel
panelview.cpp: Move setPosition to resizePanel
Avoids a race condition where panel size is wrong when setting the position of panel, which causes wrong sizes with fit content panels.
This bug only happens during plasmashell startup and when the bottom panel is set to "Fit content" and has only one item, in this case task manager applet. The panel gets wrong information during resizing due to a race condition with position being in wrong offset, and it shrinks or expands weirdly.
Making sure we always setPosition
when resizePanel
is called seems to fix the issue.
Screenshots
Panel state | Before | After |
---|---|---|
Floating | ![]() |
![]() |
Non-floating | ![]() |
![]() |