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

@ -94,9 +94,16 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) {
static void surface_handle_commit(struct wl_listener *listener, void *data) {
struct surface *surface = wl_container_of(listener, surface, commit);
wlr_scene_rect_set_size(surface->border,
surface->wlr->current.width + 2 * border_width,
surface->wlr->current.height + 2 * border_width);
struct wlr_xdg_toplevel *xdg_toplevel =
wlr_xdg_toplevel_try_from_wlr_surface(surface->wlr);
if (xdg_toplevel != NULL && xdg_toplevel->base->initial_commit) {
wlr_xdg_toplevel_set_size(xdg_toplevel, 0, 0);
}
}
static void surface_handle_destroy(struct wl_listener *listener, void *data) {