Skip to content

wayland/xdg-shell: Send xdg_popup.popup_done when position invalid

Jonas Ådahl requested to merge jadahl/mutter:wip/popup-done-on-invalid into main

A client may provide a positioner that places the window outside of its parent. This isn't allowed, according to spec, so we hide the window and log a warning. This, however, leads these affected clients with an incorrect view of what is mapped or not, meaning it becomes harder to recover.

Fix this by sending xdg_popup.done when we hide the popup due to an invalid position. Don't error out the client, let the bug slide, as that's a less jarring experience for existing applications that reproduce this than being disconnected, which practically feels like a crash.

Related: #2408

Merge request reports