diff --git a/WINGs/wclient_wl.c b/WINGs/wclient_wl.c index 71b8327..246ec9c 100644 --- a/WINGs/wclient_wl.c +++ b/WINGs/wclient_wl.c @@ -305,6 +305,12 @@ xdg_surface_handle_configure(void *data, struct xdg_surface *xs, uint32_t serial W_SetViewBacking(top->view->window, nb->image); top->view->size.width = top->pending_w; top->view->size.height = top->pending_h; + /* Repaint all content into the new buffer */ + if (top->view->flags.mapped) { + extern void (*W_WLClientRedisplayFn)(W_View *view); + if (W_WLClientRedisplayFn) + W_WLClientRedisplayFn(top->view); + } } } /* On the very first configure, attach the buffer and commit so diff --git a/WINGs/wview_wl.c b/WINGs/wview_wl.c index 51614d4..2bf7984 100644 --- a/WINGs/wview_wl.c +++ b/WINGs/wview_wl.c @@ -18,6 +18,14 @@ static unsigned int wl_view_next_id = WL_VIEW_ID_BASE; void (*W_ViewCommitBackingFn)(unsigned long id) = NULL; void (*W_ViewDestroyBackingFn)(unsigned long id) = NULL; +/* Callback for wclient_wl.c to trigger a full redisplay after resize */ +static void wl_redisplay(void *vctx, W_View *view); +static void wl_client_redisplay_wrapper(W_View *view) { + if (view && view->screen) + wl_redisplay(view->screen->viewBackendCtx, view); +} +void (*W_WLClientRedisplayFn)(W_View *view) = wl_client_redisplay_wrapper; + /* Clipboard hooks set by WM backend for cross-client clipboard */ void (*W_ClipboardStoreFn)(const char *text, int len) = NULL; char *(*W_ClipboardFetchFn)(int *len_out) = NULL;