[effects/diminactive] Delete active transitions when window is deleted
Summary: The Dim Inactive effect expects that the windowClosed signal always proceeds the windowDeleted signal. But in some cases that's not the case. If a window gets destroyed before becoming ready for painting, only the windowDeleted signal will be emitted. In addition to that, KWin will activate that window, which means we'll probably start a transition for it. Because this effect cannot terminate active transitions for such windows, KWin can crash in postPaintScreen. This change addresses the crash in postPaintScreen by adding extra clean up stuff in the windowDeleted slot to make sure that there are no transitions for deleted windows. The proper fix would be to not emit windowActivated signal for windows that are not ready for painting. BUG: 399612 FIXED-IN: 5.14.1 Test Plan: Ran ``` x <- seq(5, 15, length=1000) y <- dnorm(x, mean=10, sd=3) plot(x, y, type="l", lwd=1) ``` in RKWard multiple times. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16130
This commit is contained in:
parent
273a3fabd0
commit
396f8f558c
1 changed files with 6 additions and 0 deletions
|
@ -372,6 +372,12 @@ void DimInactiveEffect::windowClosed(EffectWindow *w)
|
|||
void DimInactiveEffect::windowDeleted(EffectWindow *w)
|
||||
{
|
||||
m_forceDim.remove(w);
|
||||
|
||||
// FIXME: Sometimes we can miss the window close signal because KWin
|
||||
// can activate a window that is not ready for painting and the window
|
||||
// gets destroyed immediately. So, we have to remove active transitions
|
||||
// for that window here, otherwise we'll crash in postPaintScreen.
|
||||
m_transitions.remove(w);
|
||||
}
|
||||
|
||||
void DimInactiveEffect::activeFullScreenEffectChanged()
|
||||
|
|
Loading…
Reference in a new issue