/* Focus that client if the button was _pressed_ */
view_focus(view);
switch (view_area) {
+ case LAB_DECO_BUTTON_CLOSE:
+ view->impl->close(view);
+ break;
case LAB_DECO_PART_TITLE:
interactive_begin(view, LAB_CURSOR_MOVE, 0);
break;
(uint32_t)geo.height);
}
+static void xdg_toplevel_view_close(struct view *view)
+{
+ wlr_xdg_toplevel_send_close(view->xdg_surface);
+}
+
static const struct view_impl xdg_toplevel_view_impl = {
.configure = xdg_toplevel_view_configure,
+ .close = xdg_toplevel_view_close,
};
void xdg_surface_new(struct wl_listener *listener, void *data)
static void xwl_view_configure(struct view *view, struct wlr_box geo)
{
- return wlr_xwayland_surface_configure(view->xwayland_surface,
- (int16_t)geo.x, (int16_t)geo.y,
- (uint16_t)geo.width,
- (uint16_t)geo.height);
+ wlr_xwayland_surface_configure(view->xwayland_surface, (int16_t)geo.x,
+ (int16_t)geo.y, (uint16_t)geo.width,
+ (uint16_t)geo.height);
+}
+
+static void xwl_view_close(struct view *view)
+{
+ wlr_xwayland_surface_close(view->xwayland_surface);
}
static const struct view_impl xwl_view_impl = {
.configure = xwl_view_configure,
+ .close = xwl_view_close,
};
void xwl_surface_new(struct wl_listener *listener, void *data)