thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/ian/src/smithay/src/wayland/compositor/tree.rs:275:43
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
It should generate a protocol error in this particular case, with 0 as the size in both dimensions but an anchor in only one. Need to make sure it generates that, and also correctly handles 0 where it is valid.
Seems to panic using set_anchor(Anchor::BOTTOM | Anchor::TOP) as well. Presumably that should work without an protocol error (and certainly not a compositor crash).
This can be reproduced by modifying https://github.com/Smithay/client-toolkit/blob/master/examples/simple_layer.rs to use
set_size(0, 0)
and running it under a compositor like Anvil:That seems like an interesting line to fail on: https://github.com/Smithay/smithay/blob/ae7fb22315a8cf16c33b5468e9d2faaa4390520d/src/wayland/compositor/tree.rs#L275C13-L275C52
It should generate a protocol error in this particular case, with 0 as the size in both dimensions but an anchor in only one. Need to make sure it generates that, and also correctly handles 0 where it is valid.