diff options
author | Simon Ser <contact@emersion.fr> | 2022-02-07 20:55:02 +0100 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-02-07 23:22:16 +0300 |
commit | 9a6687ee04db948a9f61cf2f4cc5966be84c822c (patch) | |
tree | b3847e914c9025244e6b525c0c06c14238e1d528 /sway/desktop | |
parent | f795aa1c95b1283c0a32b03c80dced14389cd38a (diff) |
xdg-shell: use wlr_xdg_popup in sway_xdg_popup
Improved type safety.
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/xdg_shell.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index fe6e0fae..6af67207 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -24,11 +24,11 @@ static const struct sway_view_child_impl popup_impl; static void popup_get_view_coords(struct sway_view_child *child, int *sx, int *sy) { struct sway_xdg_popup *popup = (struct sway_xdg_popup *)child; - struct wlr_xdg_surface *surface = popup->wlr_xdg_surface; + struct wlr_xdg_popup *wlr_popup = popup->wlr_xdg_popup; - wlr_xdg_popup_get_toplevel_coords(surface->popup, - surface->popup->geometry.x - surface->current.geometry.x, - surface->popup->geometry.y - surface->current.geometry.y, + wlr_xdg_popup_get_toplevel_coords(wlr_popup, + wlr_popup->geometry.x - wlr_popup->base->current.geometry.x, + wlr_popup->geometry.y - wlr_popup->base->current.geometry.y, sx, sy); } @@ -65,7 +65,7 @@ static void popup_handle_destroy(struct wl_listener *listener, void *data) { static void popup_unconstrain(struct sway_xdg_popup *popup) { struct sway_view *view = popup->child.view; - struct wlr_xdg_popup *wlr_popup = popup->wlr_xdg_surface->popup; + struct wlr_xdg_popup *wlr_popup = popup->wlr_xdg_popup; struct sway_output *output = view->container->pending.workspace->output; @@ -91,7 +91,7 @@ static struct sway_xdg_popup *popup_create( return NULL; } view_child_init(&popup->child, &popup_impl, view, xdg_surface->surface); - popup->wlr_xdg_surface = xdg_surface; + popup->wlr_xdg_popup = xdg_surface->popup; wl_signal_add(&xdg_surface->events.new_popup, &popup->new_popup); popup->new_popup.notify = popup_handle_new_popup; |