aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-14 21:56:19 -0400
committerGuido Günther <agx@sigxcpu.org>2018-04-23 11:24:06 +0200
commit52baf3dd8acee6e288ae1623860b93b116242367 (patch)
treed5f2fb2a60eee1a22de6e6d2f9e5c20b1473e344
parent0a0627f5d03afdaef2251e2442a3ff3285cd8356 (diff)
Move get_geometry call back to xdg-shell
-rw-r--r--types/wlr_layer_shell.c1
-rw-r--r--types/wlr_xdg_shell.c4
2 files changed, 2 insertions, 3 deletions
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);
}