wayland: map windows with correct geometry
Consider a simple client that doesn't use set_window_geometry, committing after attaching a buffer to a window surface. Window::geometry falls back to Window::bbox, but when Shell::map_window called Window::geometry, Window::bbox hadn't been set yet, because that only happened later in <State as CompositorHandler>::commit, so the window would be mapped with a size of (0, 0). This resulted in server-side decorations not being drawn for such clients until they were re-focused or resized. The fix is to add an extra call to Window::on_commit() before mapping it, so that its bbox is set correctly when Shell::map_window asks for its geometry.
This commit is contained in:
parent
5cebc7b97d
commit
40eb78debf
1 changed files with 1 additions and 0 deletions
|
|
@ -184,6 +184,7 @@ impl CompositorHandler for State {
|
||||||
&& with_renderer_surface_state(&surface, |state| state.buffer().is_some())
|
&& with_renderer_surface_state(&surface, |state| state.buffer().is_some())
|
||||||
{
|
{
|
||||||
let output = seat.active_output();
|
let output = seat.active_output();
|
||||||
|
window.on_commit();
|
||||||
Shell::map_window(self, &window, &output);
|
Shell::map_window(self, &window, &output);
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue