When we receive a DestroyNotify, we have to unmanage the client. However, we
were just informed that the window was destroyed, so it doesn't make sense to
try to do "something" with the window.
This commits fixes some errors from the X server (which we ignored, but still
they are gone now).
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>
Every time the systray was updated, we reparented the systray window to its
drawin. However, when the systray was already reparented, this still caused it
to be unmapped and mapped again.
So, we only should reparent the systray when we have to, and not always just for
the lulz.
Signed-off-by: Uli Schlachter <psychon@znc.in>
By setting the textbox in an align layout's middle, the submenu icon will always
get the space it needs and the textbox will get the rest. Previously, the
textbox took as much as it wanted and the image got the rest. This looked ugly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
For performance reasons, we only handle the last motion notify we receive.
However, we must make sure that the motion isn't moved after enter or leave
notifies. Else, breakage is ensured!
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>
The icon should get the same background everything else gets. Fix this by making
the background the outer-most widget in each item.
Signed-off-by: Uli Schlachter <psychon@znc.in>
We need a fixed layout here to make tag names like "media" work. Without this,
every take would get the same space, no matter how long its name is.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Lua now has access to a cairo surface via drawin.surface. When the drawing to
this surface is finished, it should call drawin:refresh() to make the result
visible.
Signed-off-by: Uli Schlachter <psychon@znc.in>
These signals also contain the x and y coordinate of the event which the
capi.button()-based signals can't provide.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If awesome is started with that flag, it won't use ARGB visuals. Theoretically,
this shouldn't be necessary, but it seems like this triggers bugs in the X
server. (Or is it just my server that doesn't like me?)
Signed-off-by: Uli Schlachter <psychon@znc.in>
It is perfectly valid for a cairo surface to delay the actual. This is mostly
done in situations where it speeds stuff up. Since we want our drawing to be
visible, we have to flush the cairo surface when we are done drawing.
Signed-off-by: Uli Schlachter <psychon@znc.in>