diff --git a/TaskBar.cxx b/TaskBar.cxx --- a/TaskBar.cxx +++ b/TaskBar.cxx @@ -81,7 +81,7 @@ } int row = 0, col = 0; - const int MAX_COLUMNS = std::max(2, static_cast(std::round(windowsToShow.count() / float(MAX_ROWS)))); + const int MAX_COLUMNS = std::max(2, static_cast(std::ceil(windowsToShow.count() / float(MAX_ROWS)))); const int ICON_SIZE = windowsToShow.count() > MAX_COLUMNS ? 22 : 32; for (WId wid : windowsToShow)