Fix crash on hotplugging displays while switched to another TTY
Currently, we inhibit renderloops when switching to another TTY, and unhibit when switching back. When we hotplug a display while switched to another TTY, its renderloop isn't inhibited by default, yet when we switch back, we try to uninhibit the fresh renderloop, which triggers an assert. Inhibiting newly created outputs while switched to another TTY fixes this crash. BUG: 435388 FIXED-IN: 5.21
This commit is contained in:
parent
c53b2fa3c5
commit
9f215a06fa
1 changed files with 4 additions and 0 deletions
|
@ -279,6 +279,10 @@ bool DrmBackend::initialize()
|
|||
|
||||
void DrmBackend::addOutput(DrmOutput *o)
|
||||
{
|
||||
if (!m_active) {
|
||||
o->renderLoop()->inhibit();
|
||||
}
|
||||
|
||||
m_outputs.append(o);
|
||||
m_enabledOutputs.append(o);
|
||||
emit o->gpu()->outputEnabled(o);
|
||||
|
|
Loading…
Reference in a new issue