From 4870c72c7800702e77971e686c557574c6a9fc12 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Wed, 13 May 2026 19:51:22 +0200 Subject: [PATCH] Fix dialog visibility: trigger paint on map, enable scene node on commit - wl_map: set mapped=1 before calling wl_redisplay (was bailing because mapped flag wasn't set yet) - wl_view_commit_backing_impl: enable scene node when content is committed (frame_buf was created disabled, never enabled before frame was mapped) --- WINGs/wview_wl.c | 13 ++++++++++++- src/backend/wayland/wl_backend.c | 5 ++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/WINGs/wview_wl.c b/WINGs/wview_wl.c index b00e030..b350b12 100644 --- a/WINGs/wview_wl.c +++ b/WINGs/wview_wl.c @@ -125,6 +125,17 @@ static void wl_noop(void *vctx, W_View *view) (void)view; } +static void wl_redisplay(void *vctx, W_View *view); + +static void wl_map(void *vctx, W_View *view) +{ + (void)vctx; + /* Set mapped early so redisplay doesn't bail out */ + view->flags.mapped = 1; + if (view->flags.realized) + wl_redisplay(vctx, view); +} + static void wl_noop_subviews(void *vctx, W_View *view) { (void)vctx; @@ -223,7 +234,7 @@ const W_ViewBackend W_ViewBackendWL = { .screen_fini = wl_screen_fini, .create_root = wl_create_root, .realize = wl_realize, - .map = wl_noop, + .map = wl_map, .unmap = wl_noop, .map_subviews = wl_noop_subviews, .unmap_subviews = wl_noop_subviews, diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 31a5067..5574925 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -5816,8 +5816,11 @@ wl_client_reparent(WNativeWindow client, WNativeWindow new_parent, int x, int y) void wl_view_commit_backing_impl(unsigned long id) { struct wl_frame_buf *fb = frame_buf_find((WNativeWindow)id); - if (fb && fb->scene_buf) + if (fb && fb->scene_buf) { wlr_scene_buffer_set_buffer(fb->scene_buf, &fb->base); + /* Enable the node — it has content now */ + wlr_scene_node_set_enabled(&fb->scene_buf->node, true); + } } static void