diff --git a/WINGs/wview_wl.c b/WINGs/wview_wl.c index ce087e3..40d91c3 100644 --- a/WINGs/wview_wl.c +++ b/WINGs/wview_wl.c @@ -342,8 +342,23 @@ static void wl_resize(void *vctx, W_View *view, unsigned int w, unsigned int h) W_SetViewBacking(view->window, img); } - if (view->flags.mapped) + if (view->flags.mapped) { + /* Notify parent of child resize (mirrors X11 ConfigureNotify + * which scroll views use to update scroller proportions). */ + if (view->parent) { + WMEvent cev; + memset(&cev, 0, sizeof(cev)); + cev.type = WME_CONFIGURE; + cev.window = view->parent->window; + cev.u.configure.window = view->window; + cev.u.configure.event = view->parent->window; + cev.u.configure.width = w; + cev.u.configure.height = h; + cev._view_target = view->parent; + WMHandleEvent(&cev); + } wl_redisplay(vctx, view); + } } static void wl_reparent(void *vctx, W_View *view, W_View *newParent, int x, int y) @@ -448,13 +463,6 @@ static void wl_redisplay(void *vctx, W_View *view) if (child->flags.mapped && child->flags.realized && !child->flags.alreadyDead) { wl_redisplay(vctx, child); } - /* Debug: log scroller-sized children in scroll-view-sized parents */ - if (view->size.width > 400 && view->size.height > 80 && view->size.height < 100 - && child->size.height <= 20 && child->size.height > 0) - wwarning("scroller? child %p size=%dx%d pos=%d,%d mapped=%d realized=%d", - (void*)child, child->size.width, child->size.height, - child->pos.x, child->pos.y, - child->flags.mapped, child->flags.realized); child = next; }