all repos — tint2 @ 2432a2ed511fed406769ddcee0b97a0ee12a4538

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Prevent division by zero in strange circumstances when the panel has size 0

git-svn-id: http://tint2.googlecode.com/svn/trunk@665 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
o9000 o9000
commit

2432a2ed511fed406769ddcee0b97a0ee12a4538

parent

9a1ec1884f6fd4880cdd94ee3a7d8f50b3010e64

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/systray/systraybar.csrc/systray/systraybar.c

@@ -171,6 +171,9 @@ void on_change_systray (void *obj)

{ // here, systray.area.posx/posy are defined by rendering engine. so we can calculate position of tray icon. Systraybar *sysbar = obj; + if (sysbar->icons_per_column == 0 || sysbar->icons_per_row == 0) + return; + Panel *panel = sysbar->area.panel; int i, posx, posy; int start = panel->area.bg->border.width + panel->area.paddingy + systray.area.bg->border.width + systray.area.paddingy + sysbar->marging/2;