diff --git a/src/wayland/popupanchor.cpp b/src/wayland/popupanchor.cpp index bf6f9850..ec6e5dbe 100644 --- a/src/wayland/popupanchor.cpp +++ b/src/wayland/popupanchor.cpp @@ -15,11 +15,15 @@ using XdgPositioner = QtWayland::xdg_positioner; using qs::wayland::xdg_shell::XdgWmBase; void WaylandPopupPositioner::reposition(PopupAnchor* anchor, QWindow* window, bool onlyIfDirty) { - if (onlyIfDirty && !anchor->isDirty()) return; auto* waylandWindow = dynamic_cast(window->handle()); auto* popupRole = waylandWindow ? waylandWindow->surfaceRole<::xdg_popup>() : nullptr; + // If a popup becomes invisble after creation ensure the _q properties will + // be set and not ignored because the rest is the same. + anchor->updatePlacement({popupRole != nullptr, 0}, {}); + + if (onlyIfDirty && !anchor->isDirty()) return; anchor->markClean(); if (popupRole) {