[Xfce4-commits] [xfce/xfwm4] 01/05: Fix div by zero with tabwin in list mode
noreply at xfce.org
noreply at xfce.org
Thu Jan 29 22:19:49 CET 2015
This is an automated email from the git hooks/post-receive script.
olivier pushed a commit to branch master
in repository xfce/xfwm4.
commit 0807e772e41496d46c8600f524b63fedbd10797b
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Thu Jan 29 21:24:33 2015 +0100
Fix div by zero with tabwin in list mode
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/tabwin.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/tabwin.c b/src/tabwin.c
index d3beaca..1889151 100644
--- a/src/tabwin.c
+++ b/src/tabwin.c
@@ -775,6 +775,10 @@ computeTabwinData (ScreenInfo *screen_info, TabwinWidget *tabwin_widget)
tabwin->icon_size = LISTVIEW_WIN_ICON_SIZE;
gtk_widget_style_get (GTK_WIDGET (tabwin_widget),
"listview-icon-size", &tabwin->icon_size, NULL);
+ tabwin->grid_rows = (int) (floor ((double) tabwin->monitor_height * WIN_MAX_RATIO /
+ (double) (tabwin->icon_size + 2 * WIN_ICON_BORDER)));
+ tabwin->grid_cols = (int) (ceil ((double) tabwin->client_count /
+ (double) tabwin->grid_rows));
}
/* pack the client icons */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list