Move get_geometry call back to xdg-shell

This commit is contained in:
Drew DeVault 2018-04-14 21:56:19 -04:00 committed by Guido Günther
parent 0a0627f5d0
commit 52baf3dd8a
2 changed files with 2 additions and 3 deletions

View File

@ -142,7 +142,6 @@ static void layer_surface_handle_get_popup(struct wl_client *client,
assert(popup_surface->role == WLR_XDG_SURFACE_ROLE_POPUP); assert(popup_surface->role == WLR_XDG_SURFACE_ROLE_POPUP);
struct wlr_xdg_popup *popup = popup_surface->popup; struct wlr_xdg_popup *popup = popup_surface->popup;
popup->parent = parent->surface; popup->parent = parent->surface;
popup->geometry = wlr_xdg_positioner_get_geometry(&popup->positioner);
wl_list_insert(&parent->popups, &popup->link); wl_list_insert(&parent->popups, &popup->link);
wlr_signal_emit_safe(&parent->events.new_popup, popup); wlr_signal_emit_safe(&parent->events.new_popup, popup);
} }

View File

@ -605,6 +605,8 @@ static void xdg_surface_handle_get_popup(struct wl_client *client,
// positioner properties // positioner properties
memcpy(&surface->popup->positioner, &positioner->attrs, memcpy(&surface->popup->positioner, &positioner->attrs,
sizeof(struct wlr_xdg_positioner)); sizeof(struct wlr_xdg_positioner));
surface->popup->geometry =
wlr_xdg_positioner_get_geometry(&positioner->attrs);
wl_resource_set_implementation(surface->popup->resource, wl_resource_set_implementation(surface->popup->resource,
&xdg_popup_implementation, surface, &xdg_popup_implementation, surface,
@ -612,8 +614,6 @@ static void xdg_surface_handle_get_popup(struct wl_client *client,
if (parent) { if (parent) {
surface->popup->parent = parent->surface; surface->popup->parent = parent->surface;
surface->popup->geometry =
wlr_xdg_positioner_get_geometry(&positioner->attrs);
wl_list_insert(&parent->popups, &surface->popup->link); wl_list_insert(&parent->popups, &surface->popup->link);
wlr_signal_emit_safe(&parent->events.new_popup, surface->popup); wlr_signal_emit_safe(&parent->events.new_popup, surface->popup);
} }