feat: add Shade/Unshade/ToggleShade actions

This builds on the work of @Consolatis in #1018.

Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
This commit is contained in:
Consolatis 2023-08-08 03:39:35 +02:00 committed by Johan Malm
parent 722a802de0
commit e05bedb140
19 changed files with 218 additions and 47 deletions

View file

@ -471,7 +471,12 @@ cursor_update_common(struct server *server, struct cursor_context *ctx,
*/
wlr_seat_pointer_notify_clear_focus(wlr_seat);
if (!seat->drag.active) {
cursor_set(seat, cursor_get_from_ssd(ctx->type));
enum lab_cursors cursor = cursor_get_from_ssd(ctx->type);
if (ctx->view && ctx->view->shaded && cursor > LAB_CURSOR_GRAB) {
/* Prevent resize cursor on borders for shaded SSD */
cursor = LAB_CURSOR_DEFAULT;
}
cursor_set(seat, cursor);
}
}
}