struct wl_event_queue *event_queue;
- uint32_t reposition_token;
- uint32_t received_reposition_token;
-
unsigned int initial_configure_received : 1;
unsigned int has_uncommitted_ack_configure : 1;
unsigned int mapped : 1;
uint32_t repositioned_token;
gboolean has_repositioned_token;
} pending;
+
+ uint32_t reposition_token;
+ uint32_t received_reposition_token;
};
typedef struct
}
if (wayland_popup->pending.has_repositioned_token)
- wayland_surface->received_reposition_token = wayland_popup->pending.repositioned_token;
+ wayland_popup->received_reposition_token = wayland_popup->pending.repositioned_token;
switch (wayland_popup->state)
{
case POPUP_STATE_WAITING_FOR_REPOSITIONED:
- if (wayland_surface->received_reposition_token != wayland_surface->reposition_token)
+ if (wayland_popup->received_reposition_token != wayland_popup->reposition_token)
return;
else
gdk_surface_thaw_updates (surface);
TRUE);
xdg_popup_reposition (wayland_surface->display_server.xdg_popup,
positioner,
- ++wayland_surface->reposition_token);
+ ++wayland_popup->reposition_token);
xdg_positioner_destroy (positioner);
gdk_surface_freeze_updates (GDK_SURFACE (wayland_popup));
if (!impl->initial_configure_received)
return FALSE;
- if (impl->reposition_token != impl->received_reposition_token)
- return FALSE;
+ if (GDK_IS_WAYLAND_POPUP (surface))
+ {
+ GdkWaylandPopup *popup = GDK_WAYLAND_POPUP (surface);
+ if (popup->reposition_token != popup->received_reposition_token)
+ return FALSE;
+ }
return TRUE;
}