Fix popup remapping and add popup + subsurface test
Trying to reproduce #1828 (closed) I suspected it was fixed by a recent subsurface fix, so I added a test case on top of a commit before those changes.
The test case added in this merge request reproduces said bug. The same test running on top of 41.rc
no longer reproduce, but instead make the test case client terminate with an error.
The reason for the failure was that mutter believed the popup had been manually dismissed (committed NULL buffer), which was true, but that should not stop the same wl_surface for being remapped again with a new xdg_popup object. xdg-shell/popup: Reset 'dismissed-by-client' state when remapping
intends to address this issue.
Thus, with both dd416dd3 (window-actor/wayland: Remove subsurface actors on dispose, from !1958 (merged)), as well as xdg-shell/popup: Reset 'dismissed-by-client
from this MR, the test passes.
While at it, I split out the wayland test cases into its own executable using the headless native backend mode, as that was necessary for implementing the test case, which uses a virtual pointer device.