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.
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent 0c03e7ccfc
commit e97b6032c2
  1. 10
      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

Loading…
Cancel
Save