commit acf7730
Michael Forney
·
2014-01-30 10:21:21 +0000 UTC
parent 4caf5cc
example/wm: Use ceil instead of round to calculate number of columns Most monitors are wider than they are tall, so it makes sense to round up.
1 files changed,
+1,
-1
+1,
-1
1@@ -65,7 +65,7 @@ static void arrange(struct screen * screen)
2
3 if (screen->num_windows == 0) return;
4
5- num_columns = round(sqrt(screen->num_windows));
6+ num_columns = ceil(sqrt(screen->num_windows));
7 num_rows = screen->num_windows / num_columns + 1;
8 window = wl_container_of(screen->windows.next, window, link);
9