mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-06 06:46:54 -04:00
Add map input to output to constrain tablet to a device. Add config.tablet_output_name for the monitor to attach to
This commit is contained in:
parent
92ed929a3c
commit
8edd0af80c
3 changed files with 38 additions and 0 deletions
|
|
@ -262,6 +262,8 @@ typedef struct {
|
|||
|
||||
char autostart[3][256];
|
||||
|
||||
char *tablet_output_name;
|
||||
|
||||
ConfigTagRule *tag_rules; // 动态数组
|
||||
int tag_rules_count; // 数量
|
||||
|
||||
|
|
@ -1983,6 +1985,11 @@ void parse_config_line(Config *config, const char *line) {
|
|||
|
||||
} else if (strncmp(key, "source", 6) == 0) {
|
||||
parse_config_file(config, value);
|
||||
} else if (strcmp(key, "tablet_output") == 0) {
|
||||
if (config->tablet_output_name) {
|
||||
free(config->tablet_output_name);
|
||||
}
|
||||
config->tablet_output_name = strdup(value);
|
||||
} else {
|
||||
fprintf(stderr, "Error: Unknown key: %s\n", key);
|
||||
}
|
||||
|
|
@ -2270,6 +2277,11 @@ void free_config(void) {
|
|||
config.cursor_theme = NULL;
|
||||
}
|
||||
|
||||
if (config.tablet_output_name) {
|
||||
free(config.tablet_output_name);
|
||||
config.tablet_output_name = NULL;
|
||||
}
|
||||
|
||||
// 释放 circle_layout
|
||||
free_circle_layout(&config);
|
||||
|
||||
|
|
@ -2559,6 +2571,10 @@ void set_value_default() {
|
|||
config.shadows_position_y = shadows_position_y;
|
||||
config.focused_opacity = focused_opacity;
|
||||
config.unfocused_opacity = unfocused_opacity;
|
||||
|
||||
/* tablet */
|
||||
config.tablet_output_name = strdup("");
|
||||
//
|
||||
memcpy(config.shadowscolor, shadowscolor, sizeof(shadowscolor));
|
||||
|
||||
memcpy(config.animation_curve_move, animation_curve_move,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue