don't render unless we have a buffer
This commit is contained in:
parent
3be7cf1a76
commit
2f79dbd9fb
1 changed files with 2 additions and 1 deletions
|
@ -165,7 +165,8 @@ void Bar::layerSurfaceConfigure(uint32_t serial, uint32_t width, uint32_t height
|
||||||
|
|
||||||
void Bar::render()
|
void Bar::render()
|
||||||
{
|
{
|
||||||
if (!visible()) return;
|
if (!_bufs)
|
||||||
|
return;
|
||||||
auto img = wl_unique_ptr<cairo_surface_t> {cairo_image_surface_create_for_data(
|
auto img = wl_unique_ptr<cairo_surface_t> {cairo_image_surface_create_for_data(
|
||||||
_bufs->data(),
|
_bufs->data(),
|
||||||
CAIRO_FORMAT_ARGB32,
|
CAIRO_FORMAT_ARGB32,
|
||||||
|
|
Loading…
Reference in a new issue