Instead of creating/destroying a window whenever the drawin is attached/detached
from some screen, a window is now created when the drawin is created and it
isn't destroyed until the drawin is garbage collected.
Since we can now safely assume that a drawin always has a associated window,
this should make it possible to simplify some stuff.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The lua code could keep a reference to out cairo surface for a drawin after it
was destroyed. So make sure the surface is finished before the associated
drawable is destroyed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
We actually have to set a proper background color on all our drawins, else the
default black will "flicker through" while the window is drawn.
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>