wayland/popup: Handle late received reposition feedback
authorJonas Ådahl <jadahl@gmail.com>
Mon, 27 Mar 2023 19:27:44 +0000 (21:27 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 1 Apr 2023 00:21:28 +0000 (20:21 -0400)
commit7bc18a125f86164bee448e32212d735a3ccf48e7
tree2d3a3d5e75f0c1e53907c27e59bc409d86d6bab7
parent5303bbf66aad3b985b0e568dd20bf2ffc2c4d4a4
wayland/popup: Handle late received reposition feedback

If we map, reposition, unmap, remap, the reposition feedback from the
last time a popup was mapped might be received while we're dealing with
the new version of the popup. At this point, the old reposition token
has no meating, so lets drop it. Also reset the reposition tokens when
creating new protocol objects, so that the reposition token are as if
we're in the initial state.

This fixes an issue where we'd get stuck if repeatedly smashing a button
that'd create popups that'd immediately get dismissed by the compositor.
gdk/wayland/gdkpopup-wayland.c