This makes the imagebox widget refuse images which have a zero or negative width
or height. A zero size causes problems where a division by zero results in inf
which makes various stuff fail in weird ways later on.
Additionally, cairo's "error surfaces" have a negative size. Displaying those
would cause all sorts of weird problems, too, so we better reject those.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes the textbox pass the markup/text it is given to oopango immediately.
If it is invalid, a lua error will be thrown and the old text will still be
shown.
This fixes a bug where the whole wibox isn't redrawn when a textbox complains
about broken UTF8.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If you managed to press mouse button 4 exactly between two entries in the
taglist, the taglist would jump by two tags instead of just one. This is because
the mouse event was forwarded to both taglist items.
This happened because the calculation in wibox' find_widgets() was wrong. If you
have a widget at (1, 1) with a size of 1x1, then (1, 1) is the only point that
this widget covers. However, the math also included the pixels (2, 1), (1, 2)
and (2, 2) in the widget's extents. This is obviously wrong.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, we used a timer with a timeout of 0 for redrawing the wibox. I had
the visual impression that the wibox was black for a moment. With strace I was
able to measure a latency of 10ms until the wibox was finally redrawn.
This now uses the "refresh" signal. With this, we get our latency down to
something like 0.15ms which sounds a lot better. :)
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes sure that textbox.text = "foo" doesn't work at all. It was never
supposed to work anyway. Sorry that I break stuff again.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of having to set the systray's base size by hand, it now automatically
uses min(avail_width, avail_height) as its base size. That's way less surprising
for people.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If a widget has a width/height of 0, we can safely draw it without running out
of the available space. This code checks if we got enough space after we now how
much space the next widget wants.
This fixes the systray. It has to be drawn at least once so that the C core can
set up stuff correctly. However, thanks to the systray having a width of 0, it
wasn't drawn by the layout.
Signed-off-by: Uli Schlachter <psychon@znc.in>