pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
489 stars 93 forks source link

Use new primary scanout output if old output is disabled #990

Closed ids1024 closed 1 week ago

ids1024 commented 1 week ago

Output in Smithay doesn't track if the output still exists, other than based on whether or not it has strong references. Which doesn't seem to be working correctly.

There may be leaked strong references to Outputs somewhere, and maybe Smithay should track if an output is still valid, generally when it is exposed as a Wayland global (https://github.com/Smithay/smithay/issues/1584). But a check like this works for now.

Addresses https://github.com/pop-os/cosmic-comp/issues/985.