WINGs/wview_wl: send WME_CONFIGURE to parent on child resize

On X11, resizing a child window generates a ConfigureNotify event
delivered to the parent. Scroll views rely on this to update scroller
proportions when the content view is resized. On Wayland, wl_resize
never generated this event, so the scroller's documentFullyVisible
flag stayed at 1 (set during initial setup when content was small)
and paintScroller drew only a stippled 'full' indicator instead of
the knob/track.

Fix: when a mapped non-toplevel view is resized, dispatch a
WME_CONFIGURE event to its parent synchronously.
This commit is contained in:
Window Maker 2026-05-24 17:27:03 +02:00
parent 4abb21dcf6
commit 7b8a6cca3f
1 changed files with 16 additions and 8 deletions

View File

@ -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;
}