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:
parent
0c03e7ccfc
commit
e97b6032c2
1 changed files with 2 additions and 8 deletions
|
@ -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…
Reference in a new issue