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