compositor: only set content type if window is on the current output

This commit is contained in:
Xaver Hugl 2024-02-27 16:13:14 +01:00
parent c11eeabc86
commit 36f6f2fb2d

View file

@ -162,7 +162,7 @@ void Compositor::composite(RenderLoop *renderLoop)
prePaintPass(superLayer, &surfaceDamage);
Window *const activeWindow = workspace()->activeWindow();
SurfaceItem *const activeFullscreenItem = activeWindow && activeWindow->isFullScreen() ? activeWindow->surfaceItem() : nullptr;
SurfaceItem *const activeFullscreenItem = activeWindow && activeWindow->isFullScreen() && activeWindow->isOnOutput(output) ? activeWindow->surfaceItem() : nullptr;
frame->setContentType(activeWindow && activeFullscreenItem ? activeFullscreenItem->contentType() : ContentType::None);
const bool wantsAdaptiveSync = activeWindow && activeWindow->isOnOutput(output) && activeWindow->wantsAdaptiveSync();