wl_window_resize: update backing store after resizing pixman image

When wl_window_resize frees the old pixman image and creates a new one,
it must call W_RegisterBacking to update the backing store. Otherwise
W_GetViewBacking returns the freed old image pointer, causing a crash
when WMDrawString (via wl_font_resolve_drawable) tries to draw into
the stale backing. This manifests on workspace name badge display
in direct render mode.
This commit is contained in:
lkn 2026-06-07 09:49:09 +02:00
parent 34be4b1287
commit 6a37107716
1 changed files with 1 additions and 0 deletions

View File

@ -263,6 +263,7 @@ void wl_window_resize(WNativeWindow win, int w, int h)
fb->height = h;
fb->base.width = w;
fb->base.height = h;
W_RegisterBacking(fb->id, fb->image);
/* Update scene graph's cached buffer size for hit-testing. */
if (fb->scene_buf)
wlr_scene_buffer_set_dest_size(fb->scene_buf, w, h);