plugins/screentransform: Avoid mangling with opengl context when a screen is removed
For the most part, the screen transform effect is inactive. So if a screen is removed, it's likely that m_states contains no entry for it.
This commit is contained in:
parent
e894f694ce
commit
bd5c566399
1 changed files with 4 additions and 3 deletions
|
@ -116,9 +116,10 @@ void ScreenTransformEffect::addScreen(Output *screen)
|
|||
|
||||
void ScreenTransformEffect::removeScreen(Output *screen)
|
||||
{
|
||||
effects->makeOpenGLContextCurrent();
|
||||
m_states.remove(screen);
|
||||
effects->doneOpenGLContextCurrent();
|
||||
if (auto it = m_states.find(screen); it != m_states.end()) {
|
||||
effects->makeOpenGLContextCurrent();
|
||||
m_states.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenTransformEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime)
|
||||
|
|
Loading…
Reference in a new issue