canonical / mir

The Mir compositor
GNU General Public License v2.0
641 stars 103 forks source link

`wlr_layer_shell_surface::set_size` does not respect 0-sized widths and heights properly #3678

Open mattkae opened 10 hours ago

mattkae commented 10 hours ago

According to the wlr layer shell protocol specification:

If you pass 0 for either value, the compositor will assign it and inform you of the assignment in the configure event. You must set your anchor to opposite edges in the dimensions you omit; not doing so is a protocol error. Both values are 0 by default.

reference: https://wayland.app/protocols/wlr-layer-shell-unstable-v1#zwlr_layer_surface_v1:request:set_size

Instead, this value appears to remain 0 such that when we hit BasicWindowManager::validate_modification_request we fail validation, which results in an error.

This error was encountered when running cosmic-panel.

AlanGriffiths commented 8 hours ago

Good find! That makes sense of what we've been seeing!

AlanGriffiths commented 8 hours ago

Mentioning #3675 and #3676: this might make them moot, but they may also contain parts of the right behaviour.