diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 740f042..b317d67 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -3693,7 +3693,7 @@ wl_frame_paint(struct WFrameWindow *fwin) { struct wl_frame_buf *fb = frame_buf_find(fwin->core->window); if (!fb || !fb->image) - return 0; /* not our frame — shouldn't happen */ + return 0; int state = fwin->flags.state; int total_w = fb->width; @@ -5439,7 +5439,15 @@ static void wl_window_resize(WNativeWindow win, int w, int h) wlr_xdg_surface_schedule_configure(v->xdg_surface); return; } - /* Frame buffer resize is handled by frame_configure. */ + struct wl_frame_buf *fb = frame_buf_find(win); + if (fb && w > 0 && h > 0 && (w != fb->width || h != fb->height)) { + pixman_image_unref(fb->image); + fb->image = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, NULL, 0); + fb->width = w; + fb->height = h; + fb->base.width = w; + fb->base.height = h; + } } static void wl_window_set_border(WNativeWindow win, unsigned long pixel) {