diff --git a/types/wlr_layer_shell.c b/types/wlr_layer_shell.c index 5c709713..9a18bebd 100644 --- a/types/wlr_layer_shell.c +++ b/types/wlr_layer_shell.c @@ -142,7 +142,6 @@ static void layer_surface_handle_get_popup(struct wl_client *client, assert(popup_surface->role == WLR_XDG_SURFACE_ROLE_POPUP); struct wlr_xdg_popup *popup = popup_surface->popup; popup->parent = parent->surface; - popup->geometry = wlr_xdg_positioner_get_geometry(&popup->positioner); wl_list_insert(&parent->popups, &popup->link); wlr_signal_emit_safe(&parent->events.new_popup, popup); } diff --git a/types/wlr_xdg_shell.c b/types/wlr_xdg_shell.c index 78b18563..4c8c9983 100644 --- a/types/wlr_xdg_shell.c +++ b/types/wlr_xdg_shell.c @@ -605,6 +605,8 @@ static void xdg_surface_handle_get_popup(struct wl_client *client, // positioner properties memcpy(&surface->popup->positioner, &positioner->attrs, sizeof(struct wlr_xdg_positioner)); + surface->popup->geometry = + wlr_xdg_positioner_get_geometry(&positioner->attrs); wl_resource_set_implementation(surface->popup->resource, &xdg_popup_implementation, surface, @@ -612,8 +614,6 @@ static void xdg_surface_handle_get_popup(struct wl_client *client, if (parent) { surface->popup->parent = parent->surface; - surface->popup->geometry = - wlr_xdg_positioner_get_geometry(&positioner->attrs); wl_list_insert(&parent->popups, &surface->popup->link); wlr_signal_emit_safe(&parent->events.new_popup, surface->popup); }