References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4106
2OFGKDENMMCWXNCF5LTIHA4ZZC2EL5ERWDYD6WQ2EDGS7LSUVMEQC
3ZTG6CX4LPFTAV4AKALPCMGUCEA3XDE3O4LVTCBAQJDTBYO5ABCAC
EQRGODLKSVSPFSUZU7BV5ER72U4QS4ATSBKV544XXQVKKTOSC7EAC
MDRC5OY5AJPT37EDXAYZ3KZ3SL5AUEVRHCIKC5QZJCY4Z5WRXIJAC
NXW63IJ62NK77SFR2WKZ35CEZYOHBU5RF72ON6VIYB53YNPD6MVQC
7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC
D425ND7AT3F7QJ3CCSESMVDOC3J5C5P32M5SJDBHECZJXLHNQ2FAC
TOFCZFUYVBVEBHMKVG6G5MKCAEF2QCQ4GKMKGQUSJRLGLDZEJF4QC
NOI4U573ODSPVF6CUC4T7QSYHZGZFHJ4EKTP5Y73LMUZPXK35FKQC
E7UO6NRGXFDMBU3BSJYRDNOA3Y7VHD7NWPHI5PHCPHQF6ZNOPZLQC
VCNLR5X75OAXVKPZQHF5RUZ7BONBUC6RPGO2NZEUD3FZ7TEVL66AC
ZPSXARCBIT2LZ4PLNMKXHIEEWG3XLVXXISIZDYNGFACDI5I256NQC
}
void
setcursorshape(struct wl_listener *listener, void *data)
{
struct wlr_cursor_shape_manager_v1_request_set_shape_event *event = data;
if (cursor_mode != CurNormal && cursor_mode != CurPressed)
return;
/* This can be sent by any client, so we check to make sure this one is
* actually has pointer focus first. If so, we can tell the cursor to
* use the provided cursor shape. */
if (event->seat_client == seat->pointer_state.focused_client)
wlr_cursor_set_xcursor(cursor, cursor_mgr,
wlr_cursor_shape_v1_name(event->shape));