Commit Graph

59 Commits

Author SHA1 Message Date
Uli Schlachter 2f406a9385 Simplify drawin screen handling
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>
2011-03-09 16:21:08 +01:00
Uli Schlachter f57dbb6a78 Remove a possibility for lua to cause X11 errors
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>
2010-12-19 14:29:52 +01:00
Uli Schlachter da78a89dcd Remove some pointless code
This is a left-over from when widgets where removed (commit
d213f19c5f).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-12-19 14:26:34 +01:00
Uli Schlachter 1076a6ea47 Drawin: Add bg_color property
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>
2010-12-12 21:14:04 +01:00
Uli Schlachter 742c0dead0 Systray: Fix
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 15:38:44 +02:00
Uli Schlachter d9aa194cb3 drawin: Let lua access the drawing surface
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>
2010-10-06 14:15:34 +02:00
Uli Schlachter 9c7ebf55fa Fix some style errors
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 13:53:07 +02:00
Uli Schlachter 1ba7f28d06 Drawin: Keep a surface for all drawing isntead of a context
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 13:53:07 +02:00
Uli Schlachter 5f5787d97b Wibox: Rename to drawin
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 13:36:02 +02:00