diff options
author | Connor E <38229097+c-edw@users.noreply.github.com> | 2019-01-14 17:53:33 +0000 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-01-15 09:13:27 +0100 |
commit | 023c92423e0ac1d538af25c6bcd6827f29527e10 (patch) | |
tree | b929469f8979ab58926e5c32227e568bb0aaf069 /sway/desktop | |
parent | a68bc5f449960a907b316e96a348c8eed69756f5 (diff) | |
download | sway-023c92423e0ac1d538af25c6bcd6827f29527e10.tar.xz |
Remove wlr_xdg_surface_send_close.
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/xdg_shell.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index f05e156f..7da86136 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -231,8 +231,9 @@ static void _close(struct sway_view *view) { return; } struct wlr_xdg_surface *surface = view->wlr_xdg_surface; - if (surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL) { - wlr_xdg_surface_send_close(surface); + if (surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL + && surface->toplevel) { + wlr_xdg_toplevel_send_close(surface); } } @@ -240,7 +241,10 @@ static void close_popups_iterator(struct wlr_surface *surface, int sx, int sy, void *data) { struct wlr_xdg_surface *xdg_surface = wlr_xdg_surface_from_wlr_surface(surface); - wlr_xdg_surface_send_close(xdg_surface); + if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP + && xdg_surface->popup) { + wlr_xdg_popup_destroy(xdg_surface); + } } static void close_popups(struct sway_view *view) { |