WV5PX6JK4SJCOOZOKPSHW73BVL4WH6SFIPVXMMLVI6I4YH4VEE5AC
J6OSBEBQXZR5JZ5TOCCUPELBPUVEQULGCXURXLPY7WFYTDEQOU2AC
S7RXJJZG4IEIVLPHEWFT5M2T3SRRO5US5SYBPXSYSWJJLXAKNNPAC
7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC
E7UO6NRGXFDMBU3BSJYRDNOA3Y7VHD7NWPHI5PHCPHQF6ZNOPZLQC
D425ND7AT3F7QJ3CCSESMVDOC3J5C5P32M5SJDBHECZJXLHNQ2FAC
2ZRKX4A24W4WNSLJNPKP3FWB3Y3UCYLWWESTC65P45BQFSJKS4PQC
NNBK7MMS3MCRQGIYBYXVSF4DJVWFVZMXDD3O2W2MUIPL23DJLXOQC
}
void
handlemove(uint32_t time)
{
/* Move the grabbed client to the new position. */
grabbed_client->x = cursor->x - grab_x;
grabbed_client->y = cursor->y - grab_y;
}
void
handleresize(uint32_t time)
{
/*
* Note that I took some shortcuts here. In a more fleshed-out compositor,
* you'd wait for the client to prepare a buffer at the new size, then
* commit any movement that was prepared.
*/
double dx = cursor->x - grab_x;
double dy = cursor->y - grab_y;
wlr_xdg_toplevel_set_size(grabbed_client->xdg_surface,
grab_width + dx, grab_height + dy);
handleresize(time);
/*
* Note that I took some shortcuts here. In a more fleshed-out
* compositor, you'd wait for the client to prepare a buffer at
* the new size, then commit any movement that was prepared.
*/
double dx = cursor->x - grab_x;
double dy = cursor->y - grab_y;
wlr_xdg_toplevel_set_size(grabbed_client->xdg_surface,
grab_width + dx, grab_height + dy);