Hi,
My first time posting here (sorry if I'm posting on the wrong place).
I'm working on this window creation framework
(https://github.com/ferreiradaselva/swfw), and for the Wayland backend I need
to implement a function to hide the "window".
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:
=============================
void swfw_hide_window_wl(struct swfw_window_wl *swfw_win_wl)
{
if (swfw_win_wl->shell_surface) {
wl_shell_surface_destroy(swfw_win_wl->shell_surface);
swfw_win_wl->shell_surface = NULL;
wl_surface_commit(swfw_win_wl->surface);
}
}
void swfw_show_window_wl(struct swfw_window_wl *swfw_win_wl)
{
if (!swfw_win_wl->shell_surface) {
swfw_win_wl->shell_surface =
wl_shell_get_shell_surface(swfw_win_wl->swfw_ctx_wl->shell,
swfw_win_wl->surface);
wl_shell_surface_add_listener(swfw_win_wl->shell_surface,
&shell_surface_listener, swfw_win_wl);
wl_shell_surface_set_toplevel(swfw_win_wl->shell_surface);
wl_surface_commit(swfw_win_wl->surface);
}
}
=============================
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.
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).
-- Felipe Ferreira
Sent with [ProtonMail](https://protonmail.com) Secure Email.
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel