You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use one panel on bottom of screen with several widgets including a window list,
Create lots of windows, such that the window list width is constrained by available panel width
Expected behavior
Windows icons in list get smaller and CPU usage stays low.
Actual behaviour
wf-panel starts consuming 100% of one CPU. WayfireWindowList::on_draw continuously runs this code - maybe once every frame?
/* We have changed the size/number of toplevels. On top of that, our list
* is longer that the max size, so we need to re-layout the buttons */
if (preferred_width > allocated_width && toplevels.size() > 0)
set_button_width(get_target_button_width());
I hacked this locally and it seems better, but I don't think it's completely correct:
/* We have changed the size/number of toplevels. On top of that, our list
* is longer that the max size, so we need to re-layout the buttons */
- if (preferred_width > allocated_width && toplevels.size() > 0)
+ if (allocated_width != this->last_allocated_width
+ && preferred_width > allocated_width
+ && toplevels.size() > 0) {
set_button_width(get_target_button_width());
+ }
+
+ this->last_allocated_width = allocated_width;
}
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Windows icons in list get smaller and CPU usage stays low.
Actual behaviour
wf-panel starts consuming 100% of one CPU. WayfireWindowList::on_draw continuously runs this code - maybe once every frame?
Wayfire version
0.7.4-2 from debian testing
Panel configuration
The text was updated successfully, but these errors were encountered: