WINGs: repaint content after XDG surface configure resize
When the compositor sends a new size via xdg_surface.configure, the client buffer was reallocated but content was never repainted into it. The surface was committed with an empty buffer, making the window content disappear after resize. Fix: after resizing the buffer in xdg_surface_handle_configure, call wl_redisplay on the toplevel view to repaint all widget content into the new buffer before committing.
This commit is contained in:
parent
85216efeea
commit
1038146e94
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue