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.
This commit is contained in:
Vlad Zahorodnii 2024-02-05 15:17:49 +02:00
parent 0c03e7ccfc
commit e97b6032c2

View file

@ -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