<div>Hi,<br></div><div><br></div><div>My first time posting here (sorry if I'm posting on the wrong place).<br></div><div><br></div><div>I'm working on this window creation framework (<a href="https://github.com/ferreiradaselva/swfw">https://github.com/ferreiradaselva/swfw</a>), and for the Wayland backend I need to implement a function to hide the "window".<br></div><div><br></div><div>I found that that is done by destroying the surface (I'm assuming the wl_shell_surface). This is currently how I'm trying to do:<br></div><div><br></div><div>=============================<br></div><div>void swfw_hide_window_wl(struct swfw_window_wl *swfw_win_wl)<br></div><div>{<br></div><div>    if (swfw_win_wl->shell_surface) {<br></div><div>        wl_shell_surface_destroy(swfw_win_wl->shell_surface);<br></div><div>        swfw_win_wl->shell_surface = NULL;<br></div><div>        wl_surface_commit(swfw_win_wl->surface);<br></div><div>    }<br></div><div>}<br></div><div><br></div><div>void swfw_show_window_wl(struct swfw_window_wl *swfw_win_wl)<br></div><div>{<br></div><div>    if (!swfw_win_wl->shell_surface) {<br></div><div>        swfw_win_wl->shell_surface = wl_shell_get_shell_surface(swfw_win_wl->swfw_ctx_wl->shell, swfw_win_wl->surface);<br></div><div>        wl_shell_surface_add_listener(swfw_win_wl->shell_surface, &shell_surface_listener, swfw_win_wl);<br></div><div>        wl_shell_surface_set_toplevel(swfw_win_wl->shell_surface);<br></div><div>        wl_surface_commit(swfw_win_wl->surface);<br></div><div>    }<br></div><div>}<br></div><div>=============================<br></div><div><br></div><div>However, even after destroying the shell surface, the surface is still rendered (testing on weston). Calling the function to show the surface again will result in the surface being rendered twice on the screen. I'm also using EGL, if that matters somehow.<br></div><div><br></div><div>I couldn't find any example on internet on how to properly hide the surface (I couldn't get working with GLFW, and SDL doesn't seem to implement the hide function on wayland).<br></div><div><br></div><div>-- Felipe Ferreira<br></div><div><br></div><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><br></div><div class="protonmail_signature_block-proton">Sent with <a href="https://protonmail.com">ProtonMail</a> Secure Email.<br></div></div><div><br></div>