mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-15 06:59:43 -05:00
Remove wlr_xdg_surface_send_close.
This commit is contained in:
parent
8134d5b1e0
commit
e7fff4f560
3 changed files with 20 additions and 19 deletions
|
|
@ -517,21 +517,17 @@ void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface) {
|
|||
surface->client->ping_serial);
|
||||
}
|
||||
|
||||
void wlr_xdg_surface_send_close(struct wlr_xdg_surface *surface) {
|
||||
switch (surface->role) {
|
||||
case WLR_XDG_SURFACE_ROLE_NONE:
|
||||
assert(0 && "not reached");
|
||||
break;
|
||||
case WLR_XDG_SURFACE_ROLE_TOPLEVEL:
|
||||
if (surface->toplevel) {
|
||||
xdg_toplevel_send_close(surface->toplevel->resource);
|
||||
}
|
||||
break;
|
||||
case WLR_XDG_SURFACE_ROLE_POPUP:
|
||||
if (surface->popup) {
|
||||
xdg_popup_send_popup_done(surface->popup->resource);
|
||||
}
|
||||
break;
|
||||
void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface) {
|
||||
if (surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL
|
||||
&& surface->toplevel) {
|
||||
xdg_toplevel_send_close(surface->toplevel->resource);
|
||||
}
|
||||
}
|
||||
|
||||
void wlr_xdg_popup_destroy(struct wlr_xdg_surface *surface) {
|
||||
if (surface->role == WLR_XDG_SURFACE_ROLE_POPUP
|
||||
&& surface->popup) {
|
||||
xdg_popup_send_popup_done(surface->popup->resource);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue