feat: add option xwayland_persistence

This commit is contained in:
DreamMaoMao 2025-06-06 17:25:46 +08:00
parent 42115b531c
commit 71e336fecc
3 changed files with 7 additions and 1 deletions

View file

@ -219,6 +219,7 @@ typedef struct {
unsigned int cursor_size;
int single_scratchpad;
int xwayland_persistence;
} Config;
@ -780,6 +781,8 @@ void parse_config_line(Config *config, const char *line) {
config->focus_cross_tag = atoi(value);
} else if (strcmp(key, "single_scratchpad") == 0) {
config->single_scratchpad = atoi(value);
} else if (strcmp(key, "xwayland_persistence") == 0) {
config->xwayland_persistence = atoi(value);
} else if (strcmp(key, "no_border_when_single") == 0) {
config->no_border_when_single = atoi(value);
} else if (strcmp(key, "snap_distance") == 0) {
@ -1807,6 +1810,7 @@ void override_config(void) {
focus_cross_monitor = config.focus_cross_monitor;
focus_cross_tag = config.focus_cross_tag;
single_scratchpad = config.single_scratchpad;
xwayland_persistence = config.xwayland_persistence;
no_border_when_single = config.no_border_when_single;
snap_distance = config.snap_distance;
drag_tile_to_tile = config.drag_tile_to_tile;
@ -1911,6 +1915,7 @@ void set_value_default() {
config.focus_cross_monitor = focus_cross_monitor;
config.focus_cross_tag = focus_cross_tag;
config.single_scratchpad = single_scratchpad;
config.xwayland_persistence = xwayland_persistence;
config.no_border_when_single = no_border_when_single;
config.snap_distance = snap_distance;
config.drag_tile_to_tile = drag_tile_to_tile;