cursor: Use enum for server set cursor names

This mainly prevents having to use strcmp() on every mouse move.
This commit is contained in:
Consolatis 2022-09-16 02:23:44 +02:00 committed by Johan Malm
parent f491942858
commit e30fce6c34
5 changed files with 110 additions and 76 deletions

View file

@ -84,10 +84,10 @@ interactive_begin(struct view *view, enum input_mode mode, uint32_t edges)
switch (mode) {
case LAB_INPUT_STATE_MOVE:
cursor_set(&server->seat, "grab");
cursor_set(&server->seat, LAB_CURSOR_GRAB);
break;
case LAB_INPUT_STATE_RESIZE:
cursor_set(&server->seat, wlr_xcursor_get_resize_name(edges));
cursor_set(&server->seat, cursor_get_from_edge(edges));
break;
default:
break;