Before drawing a background check if the buffer to use is already active

This commit is contained in:
Gergő Sályi 2023-08-31 16:43:37 +02:00
parent 7681beecba
commit 54809851d9

View file

@ -430,6 +430,15 @@ impl BackgroundLayer
);
return;
};
if workspace_bg.buffer.slot().has_active_buffers() {
debug!(
"Skipping draw on output '{}' for workspace '{}' because its buffer already active",
self.output_name,
workspace_name,
);
return;
}
// Attach and commit to new workspace background
if let Err(e) = workspace_bg.buffer.attach_to(self.layer.wl_surface()) {