From 190546fd315a24c04006fb1b177069933f4350da Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 1 Jun 2019 21:05:09 +0200 Subject: add seat sub command 'xcursor_theme' New 'seat xcursor_theme []' command that configures the default xcursor theme. The default seat's xcursor theme is also propagated to XWayland, and exported through the XCURSOR_THEME and XCURSOR_SIZE environment variables. This is done every time the default seat's configuration is changed. --- sway/config/seat.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sway/config') diff --git a/sway/config/seat.c b/sway/config/seat.c index 04a44e3a..d4190cec 100644 --- a/sway/config/seat.c +++ b/sway/config/seat.c @@ -27,6 +27,8 @@ struct seat_config *new_seat_config(const char* name) { } seat->hide_cursor_timeout = -1; seat->allow_constrain = CONSTRAIN_DEFAULT; + seat->xcursor_theme.name = NULL; + seat->xcursor_theme.size = 24; return seat; } @@ -147,6 +149,12 @@ void merge_seat_config(struct seat_config *dest, struct seat_config *source) { if (source->allow_constrain != CONSTRAIN_DEFAULT) { dest->allow_constrain = source->allow_constrain; } + + if (source->xcursor_theme.name != NULL) { + free(dest->xcursor_theme.name); + dest->xcursor_theme.name = strdup(source->xcursor_theme.name); + dest->xcursor_theme.size = source->xcursor_theme.size; + } } struct seat_config *copy_seat_config(struct seat_config *seat) { @@ -170,6 +178,7 @@ void free_seat_config(struct seat_config *seat) { seat_attachment_config_free(seat->attachments->items[i]); } list_free(seat->attachments); + free(seat->xcursor_theme.name); free(seat); } -- cgit v1.2.3