static void movemouse(struct dwl_server *server, const Arg *unused) {
double sx, sy;
struct wlr_surface *surface;
struct dwl_view *view = desktop_view_at(server,
server->cursor->x, server->cursor->y, &surface, &sx, &sy);
if (!view) {
return;
}
begin_interactive(view, DWL_CURSOR_MOVE, 0);
}
static void resizemouse(struct dwl_server *server, const Arg *unused) {
double sx, sy;
struct wlr_surface *surface;
struct dwl_view *view = desktop_view_at(server,
server->cursor->x, server->cursor->y, &surface, &sx, &sy);
if (!view) {
return;
}
struct wlr_box geo_box;
wlr_xdg_surface_get_geometry(view->xdg_surface, &geo_box);
wlr_cursor_warp_closest(server->cursor, NULL,
view->x + geo_box.x + geo_box.width,
view->y + geo_box.y + geo_box.height);
begin_interactive(view, DWL_CURSOR_RESIZE, WLR_EDGE_BOTTOM|WLR_EDGE_RIGHT);
}