diff options
author | emersion <contact@emersion.fr> | 2018-03-24 22:02:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-24 22:02:40 +0100 |
commit | 80d3561d325335e92b196f7cb5797eea9d71d17d (patch) | |
tree | 0241ed7f5e472c9cb8bdce1b89bc2ffe6c62fcc3 /rootston | |
parent | 7cc042f54c04141512934958fe8547b34ee38357 (diff) | |
parent | f53575e3a364ada15e2de213bf664d3947f7d347 (diff) | |
download | wlroots-80d3561d325335e92b196f7cb5797eea9d71d17d.tar.xz |
Merge pull request #743 from acrisci/xdg-surface-close
unified xdg-surface close
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/xdg_shell.c | 6 | ||||
-rw-r--r-- | rootston/xdg_shell_v6.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/rootston/xdg_shell.c b/rootston/xdg_shell.c index 851c0045..099e622c 100644 --- a/rootston/xdg_shell.c +++ b/rootston/xdg_shell.c @@ -177,9 +177,11 @@ static void set_fullscreen(struct roots_view *view, bool fullscreen) { static void close(struct roots_view *view) { assert(view->type == ROOTS_XDG_SHELL_VIEW); struct wlr_xdg_surface *surface = view->xdg_surface; - if (surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL) { - wlr_xdg_toplevel_send_close(surface); + struct wlr_xdg_popup *popup = NULL; + wl_list_for_each(popup, &surface->popups, link) { + wlr_xdg_surface_send_close(popup->base); } + wlr_xdg_surface_send_close(surface); } static void destroy(struct roots_view *view) { diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c index 13d25331..001232ab 100644 --- a/rootston/xdg_shell_v6.c +++ b/rootston/xdg_shell_v6.c @@ -177,9 +177,11 @@ static void set_fullscreen(struct roots_view *view, bool fullscreen) { static void close(struct roots_view *view) { assert(view->type == ROOTS_XDG_SHELL_V6_VIEW); struct wlr_xdg_surface_v6 *surface = view->xdg_surface_v6; - if (surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL) { - wlr_xdg_toplevel_v6_send_close(surface); + struct wlr_xdg_popup_v6 *popup = NULL; + wl_list_for_each(popup, &surface->popups, link) { + wlr_xdg_surface_v6_send_close(popup->base); } + wlr_xdg_surface_v6_send_close(surface); } static void destroy(struct roots_view *view) { |