mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-30 21:37:39 -04:00
feat: tablet support
This commit is contained in:
parent
d28cf7b4d2
commit
9f31a8be56
4 changed files with 491 additions and 11 deletions
|
|
@ -289,6 +289,9 @@ typedef struct {
|
|||
double mouse_accel_speed;
|
||||
double axis_scroll_factor;
|
||||
|
||||
/* tablet */
|
||||
char *tablet_map_to_mon;
|
||||
|
||||
/* Trackpad */
|
||||
int32_t trackpad_natural_scrolling;
|
||||
uint32_t trackpad_accel_profile;
|
||||
|
|
@ -1728,6 +1731,10 @@ bool parse_option(Config *config, char *key, char *value) {
|
|||
config->button_map = atoi(value);
|
||||
} else if (strcmp(key, "axis_scroll_factor") == 0) {
|
||||
config->axis_scroll_factor = atof(value);
|
||||
} else if (strcmp(key, "tablet_map_to_mon") == 0) {
|
||||
if (config->tablet_map_to_mon)
|
||||
free(config->tablet_map_to_mon);
|
||||
config->tablet_map_to_mon = strdup(value);
|
||||
} else if (strcmp(key, "trackpad_scroll_factor") == 0) {
|
||||
config->trackpad_scroll_factor = atof(value);
|
||||
} else if (strcmp(key, "gappih") == 0) {
|
||||
|
|
@ -3169,6 +3176,11 @@ void free_config(void) {
|
|||
config.cursor_theme = NULL;
|
||||
}
|
||||
|
||||
if (config.tablet_map_to_mon) {
|
||||
free(config.tablet_map_to_mon);
|
||||
config.tablet_map_to_mon = NULL;
|
||||
}
|
||||
|
||||
// 释放 circle_layout
|
||||
free_circle_layout(&config);
|
||||
|
||||
|
|
@ -3635,6 +3647,7 @@ bool parse_config(void) {
|
|||
config.tag_rules = NULL;
|
||||
config.tag_rules_count = 0;
|
||||
config.cursor_theme = NULL;
|
||||
config.tablet_map_to_mon = NULL;
|
||||
strcpy(config.keymode, "default");
|
||||
|
||||
create_config_keymap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue