|
|
@ -517,22 +517,16 @@ void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface) {
|
|
|
|
surface->client->ping_serial);
|
|
|
|
surface->client->ping_serial);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void wlr_xdg_surface_send_close(struct wlr_xdg_surface *surface) {
|
|
|
|
void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface) {
|
|
|
|
switch (surface->role) {
|
|
|
|
assert(surface->toplevel);
|
|
|
|
case WLR_XDG_SURFACE_ROLE_NONE:
|
|
|
|
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
|
|
|
|
assert(0 && "not reached");
|
|
|
|
xdg_toplevel_send_close(surface->toplevel->resource);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case WLR_XDG_SURFACE_ROLE_TOPLEVEL:
|
|
|
|
|
|
|
|
if (surface->toplevel) {
|
|
|
|
void wlr_xdg_popup_destroy(struct wlr_xdg_surface *surface) {
|
|
|
|
xdg_toplevel_send_close(surface->toplevel->resource);
|
|
|
|
assert(surface->popup);
|
|
|
|
}
|
|
|
|
assert(surface->role == WLR_XDG_SURFACE_ROLE_POPUP);
|
|
|
|
break;
|
|
|
|
xdg_popup_send_popup_done(surface->popup->resource);
|
|
|
|
case WLR_XDG_SURFACE_ROLE_POPUP:
|
|
|
|
|
|
|
|
if (surface->popup) {
|
|
|
|
|
|
|
|
xdg_popup_send_popup_done(surface->popup->resource);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void xdg_popup_get_position(struct wlr_xdg_popup *popup,
|
|
|
|
static void xdg_popup_get_position(struct wlr_xdg_popup *popup,
|
|
|
|