WINGs: send WME_CONFIGURE on resize + debug scroller iteration
- Send WME_CONFIGURE event after xdg_surface configure resize so widget delegates can relayout children. - Add temporary debug to identify why scroller isn't rendering.
This commit is contained in:
parent
1038146e94
commit
577e2d6c45
|
|
@ -305,6 +305,18 @@ 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;
|
||||
|
||||
/* Notify WINGs of the resize so widget delegates relayout */
|
||||
WMEvent cev;
|
||||
memset(&cev, 0, sizeof(cev));
|
||||
cev.type = WME_CONFIGURE;
|
||||
cev.window = top->view->window;
|
||||
cev.u.configure.window = top->view->window;
|
||||
cev.u.configure.event = top->view->window;
|
||||
cev.u.configure.width = top->pending_w;
|
||||
cev.u.configure.height = top->pending_h;
|
||||
W_WL_EnqueueEvent(top->ctx->scr, &cev, top->view);
|
||||
|
||||
/* Repaint all content into the new buffer */
|
||||
if (top->view->flags.mapped) {
|
||||
extern void (*W_WLClientRedisplayFn)(W_View *view);
|
||||
|
|
|
|||
|
|
@ -443,13 +443,18 @@ static void wl_redisplay(void *vctx, W_View *view)
|
|||
|
||||
/* Re-composite all mapped children into this view's backing */
|
||||
W_View *child = view->childrenList;
|
||||
int _childcount = 0;
|
||||
while (child) {
|
||||
W_View *next = child->nextSister;
|
||||
_childcount++;
|
||||
if (child->flags.mapped && child->flags.realized && !child->flags.alreadyDead) {
|
||||
wl_redisplay(vctx, child);
|
||||
}
|
||||
child = next;
|
||||
}
|
||||
if (_childcount > 2 && view->size.height > 50 && view->size.height < 100)
|
||||
wwarning("wl_redisplay: view %p size=%dx%d children=%d",
|
||||
(void*)view, view->size.width, view->size.height, _childcount);
|
||||
|
||||
/* Composite this view's backing into its parent's backing */
|
||||
if (view->parent) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue