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);
|
WLClientToplevel *top = wlc_top_find(id);
|
||||||
if (!top || !top->surface) return;
|
if (!top || !top->surface) return;
|
||||||
/* Attach NULL + commit: the standard Wayland way to hide a surface.
|
/* Attach NULL + commit to hide the surface. The xdg_surface
|
||||||
* This triggers a wlroots xdg unmap and the compositor sends a new
|
* stays configured after the first configure/ack, so subsequent
|
||||||
* configure event. We set configured=0 so the next commit waits
|
* commits do not need a new configure event. */
|
||||||
* 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. */
|
|
||||||
wl_surface_attach(top->surface, NULL, 0, 0);
|
wl_surface_attach(top->surface, NULL, 0, 0);
|
||||||
wl_surface_commit(top->surface);
|
wl_surface_commit(top->surface);
|
||||||
top->configured = 0;
|
top->mapped = 0;
|
||||||
if (top->ctx && top->ctx->display)
|
if (top->ctx && top->ctx->display)
|
||||||
wl_display_flush(top->ctx->display);
|
wl_display_flush(top->ctx->display);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue