From 0024e9426e58b4e3ec39a069de3a88363f526870 Mon Sep 17 00:00:00 2001 From: stransky Date: Thu, 7 Apr 2022 13:20:07 +0000 Subject: [PATCH] Bug 1761870 [Wayland] Mark MozContainer as mapped to make sure moz_container_wayland_unmap() is called on hide/withdraw r=emilio Depends on D143168 Differential Revision: https://phabricator.services.mozilla.com/D143169 --- widget/gtk/MozContainerWayland.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp index 330d6d46077d..9483dc7db91f 100644 --- a/widget/gtk/MozContainerWayland.cpp +++ b/widget/gtk/MozContainerWayland.cpp @@ -359,6 +359,10 @@ static gboolean moz_container_wayland_map_event(GtkWidget* widget, LOGWAYLAND("%s [%p]\n", __FUNCTION__, (void*)moz_container_get_nsWindow(MOZ_CONTAINER(widget))); + // We need to mark MozContainer as mapped to make sure + // moz_container_wayland_unmap() is called on hide/withdraw. + gtk_widget_set_mapped(widget, TRUE); + // Don't create wl_subsurface in map_event when it's already created or // if we create it for the first time. if (wl_container->ready_to_draw || wl_container->before_first_size_alloc) {