forge
Explore
Log in

Don't you dare go Hollow

layout: Narrow error! condition in update_render_elements()

Browse files at this commit

b3f5255bb95365a01e4fdf9a22acc7edb86ec4e2Ivan MolodetskikhParent: 8c169b1
As far as I can tell, the only place where we can hit this currently is
do-screen-transition when no outputs are connected. A check could be
trivially added there, but I don't think it's worth enforcing it with an
error! -- it's just an optimization (avoiding running unnecessary code)
while being rare and difficult to find if it does get logged.
src/layout/mod.rsmodified+3 -1
@@ -2753,7 +2753,9 @@ impl<W: LayoutElement> Layout<W> {
2753 ..2753 ..
2754 } = &mut self.monitor_set2754 } = &mut self.monitor_set
2755 else {2755 else {
2756- error!("update_render_elements called with no monitors");2756+ if output.is_some() {
2757+ error!("update_render_elements called with no monitors but Some output");
2758+ }
2757 return;2759 return;
2758 };2760 };
2759 2761