Allow programmatically closing xwayland window

This commit is contained in:
John Good
2020-03-22 18:19:38 +01:00
committed by Daniel Stone
parent b46d0e3304
commit f33ddd0839
3 changed files with 24 additions and 0 deletions
+11
View File
@@ -2783,6 +2783,16 @@ send_configure(struct weston_surface *surface, int32_t width, int32_t height)
weston_wm_window_configure, window);
}
static void
send_close(struct weston_surface *surface)
{
struct weston_wm_window *window = get_wm_window(surface);
if (!window || !window->wm)
return;
weston_wm_window_close(window, XCB_CURRENT_TIME);
xcb_flush(window->wm->conn);
}
static void
send_position(struct weston_surface *surface, int32_t x, int32_t y)
{
@@ -2812,6 +2822,7 @@ send_position(struct weston_surface *surface, int32_t x, int32_t y)
static const struct weston_xwayland_client_interface shell_client = {
send_configure,
send_close,
};
static int
+1
View File
@@ -31,6 +31,7 @@ struct weston_desktop_xwayland_surface;
struct weston_xwayland_client_interface {
void (*send_configure)(struct weston_surface *surface, int32_t width, int32_t height);
void (*send_close)(struct weston_surface *surface);
};
struct weston_desktop_xwayland_interface {