Fix dialog content rendering: re-trigger child paint when top-level maps
Children were painted during panel creation (before frame_buf backing was connected). Now wl_map triggers wl_map_subviews when a top-level view is mapped, re-painting all children into the correct backing image.
This commit is contained in:
parent
305b8096da
commit
6cda661609
|
|
@ -133,6 +133,7 @@ static void wl_noop(void *vctx, W_View *view)
|
|||
}
|
||||
|
||||
static void wl_redisplay(void *vctx, W_View *view);
|
||||
static void wl_map_subviews(void *vctx, W_View *view);
|
||||
|
||||
static void wl_map(void *vctx, W_View *view)
|
||||
{
|
||||
|
|
@ -140,15 +141,17 @@ static void wl_map(void *vctx, W_View *view)
|
|||
/* Set mapped early so redisplay doesn't bail out */
|
||||
view->flags.mapped = 1;
|
||||
/* Only trigger redisplay for top-level views (dialogs) */
|
||||
if (view->flags.topLevel && view->flags.realized)
|
||||
if (view->flags.topLevel && view->flags.realized) {
|
||||
wl_map_subviews(vctx, view);
|
||||
wl_redisplay(vctx, view);
|
||||
}
|
||||
}
|
||||
|
||||
static void wl_map_subviews(void *vctx, W_View *view)
|
||||
{
|
||||
W_View *child = view->childrenList;
|
||||
while (child) {
|
||||
if (child->flags.realized && !child->flags.mapped) {
|
||||
if (child->flags.realized) {
|
||||
child->flags.mapped = 1;
|
||||
wl_redisplay(vctx, child);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue