From e97b6032c2993eeebf9197b5eeb610439c276d28 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 5 Feb 2024 15:17:49 +0200 Subject: [PATCH] effect: Allow ref'ing normal windows It can be used to simplify state tracking in some effects. The restriction exists because there used to be separation between normal and closed windows (Toplevel and Deleted), and one could reference only Deleted windows. So it was easier just to forbid referencing still alive windows. --- src/effect/effectwindow.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/effect/effectwindow.cpp b/src/effect/effectwindow.cpp index 3f2c5e9b89..e46687bdf5 100644 --- a/src/effect/effectwindow.cpp +++ b/src/effect/effectwindow.cpp @@ -221,18 +221,12 @@ const EffectWindowGroup *EffectWindow::group() const void EffectWindow::refWindow() { - if (d->m_window->isDeleted()) { - return d->m_window->ref(); - } - Q_UNREACHABLE(); // TODO + d->m_window->ref(); } void EffectWindow::unrefWindow() { - if (d->m_window->isDeleted()) { - return d->m_window->unref(); - } - Q_UNREACHABLE(); // TODO + d->m_window->unref(); } Output *EffectWindow::screen() const