Systray: Correctly compute extents (FS#768)

The systray bases its extents on the size of the wibox that it is contained in.
No idea how this is supposed to work when the systray doesn't get the full size,
but in a vertical wibox, using <height of wibox> * <number of icons in systray>
certainly doesn't work for computing the size.

The fix isn't hard: Check the wibox' orientation when drawing and base our
calculation on its width if its orientation is different from East.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-08-31 18:48:09 +02:00
parent a3f911cf95
commit e1b15b2bb8
1 changed files with 5 additions and 1 deletions

View File

@ -67,7 +67,11 @@ systray_draw(widget_t *widget, draw_context_t *ctx,
uint32_t orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
systray_data_t *d = widget->data;
d->height = p->geometry.height;
if (p->orientation == East)
d->height = p->geometry.height;
else
d->height = p->geometry.width;
/* set wibox orientation */
/** \todo stop setting that property on each redraw */