wl_client_view_unmap: NULL buffer without configured=0; surface stays configured after first configure
This commit is contained in:
parent
a6a692baf1
commit
88596112f3
|
|
@ -568,15 +568,12 @@ wl_client_view_unmap(WNativeWindow id)
|
|||
{
|
||||
WLClientToplevel *top = wlc_top_find(id);
|
||||
if (!top || !top->surface) return;
|
||||
/* Attach NULL + commit: the standard Wayland way to hide a surface.
|
||||
* This triggers a wlroots xdg unmap and the compositor sends a new
|
||||
* configure event. We set configured=0 so the next commit waits
|
||||
* for the configure. The popup reopen path (wl_map) calls
|
||||
* wl_display_dispatch_pending after redisplay to ensure the
|
||||
* configure is processed before the user can interact. */
|
||||
/* Attach NULL + commit to hide the surface. The xdg_surface
|
||||
* stays configured after the first configure/ack, so subsequent
|
||||
* commits do not need a new configure event. */
|
||||
wl_surface_attach(top->surface, NULL, 0, 0);
|
||||
wl_surface_commit(top->surface);
|
||||
top->configured = 0;
|
||||
top->mapped = 0;
|
||||
if (top->ctx && top->ctx->display)
|
||||
wl_display_flush(top->ctx->display);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue