layer-shell: handle commits before map

A client is free to change its mind and request a different
size/anchor/etc after recieving the initial configure but before
attaching and committing the first buffer. This means that we should
respond to such a situation with a new configure.

mako has been observed doing this in the wild for example.
This commit is contained in:
Isaac Freund
2021-06-21 19:02:24 +02:00
parent a2c81adba0
commit 3efcfedcf4
4 changed files with 46 additions and 36 deletions

View File

@ -490,7 +490,7 @@ fn applyOutputConfig(self: *Self, config: *wlr.OutputConfigurationV1) bool {
// Arrange layers to adjust the usable_box
// We dont need to call arrangeViews() since arrangeLayers() will call
// it for us because the usable_box changed
output.arrangeLayers();
output.arrangeLayers(.mapped);
self.startTransaction();
}