perf: don't rerender on configure, if w/h didn't change
This commit is contained in:
parent
b5c9de5619
commit
a6104020cb
1 changed files with 2 additions and 0 deletions
|
@ -158,6 +158,8 @@ void Bar::click(Monitor* mon, int x, int, int btn)
|
||||||
void Bar::layerSurfaceConfigure(uint32_t serial, uint32_t width, uint32_t height)
|
void Bar::layerSurfaceConfigure(uint32_t serial, uint32_t width, uint32_t height)
|
||||||
{
|
{
|
||||||
zwlr_layer_surface_v1_ack_configure(_layerSurface.get(), serial);
|
zwlr_layer_surface_v1_ack_configure(_layerSurface.get(), serial);
|
||||||
|
if (width == _bufs->width && height == _bufs->height)
|
||||||
|
return;
|
||||||
_bufs.emplace(width, height, WL_SHM_FORMAT_XRGB8888);
|
_bufs.emplace(width, height, WL_SHM_FORMAT_XRGB8888);
|
||||||
render();
|
render();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue