examples: send xdg_toplevel configure events

Commit 811ca199c4 ("xdg-shell: drop automatic surface configuration")
has updated tinywl for the breaking change, but missed examples.
This commit is contained in:
Simon Ser 2024-03-15 13:18:41 +01:00
parent 7a8e2cd8ed
commit 65bf7d1679
3 changed files with 45 additions and 0 deletions

View file

@ -204,6 +204,12 @@ static void output_surface_handle_commit(struct wl_listener *listener,
struct output_surface *output_surface =
wl_container_of(listener, output_surface, commit);
struct wlr_xdg_toplevel *xdg_toplevel =
wlr_xdg_toplevel_try_from_wlr_surface(output_surface->wlr_surface);
if (xdg_toplevel != NULL && xdg_toplevel->base->initial_commit) {
wlr_xdg_toplevel_set_size(xdg_toplevel, 0, 0);
}
struct wlr_buffer *buffer = NULL;
if (output_surface->wlr_surface->buffer != NULL) {
buffer = wlr_buffer_lock(&output_surface->wlr_surface->buffer->base);