Merge pull request #2598 from tokyo4j/refactor-magnifier

magnifier: refactor
This commit is contained in:
Hiroaki Yamamoto 2025-03-13 15:20:34 +09:00 committed by GitHub
commit 4750214d42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 95 additions and 123 deletions

View file

@ -1282,8 +1282,10 @@ entry(xmlNode *node, char *nodename, char *content, struct parser_state *state)
rc.mag_height = atoi(content);
} else if (!strcasecmp(nodename, "initScale.magnifier")) {
set_float(content, &rc.mag_scale);
rc.mag_scale = MAX(1.0, rc.mag_scale);
} else if (!strcasecmp(nodename, "increment.magnifier")) {
set_float(content, &rc.mag_increment);
rc.mag_increment = MAX(0, rc.mag_increment);
} else if (!strcasecmp(nodename, "useFilter.magnifier")) {
set_bool(content, &rc.mag_filter);
}
@ -1797,10 +1799,6 @@ post_processing(void)
wlr_log(WLR_INFO, "load default window switcher fields");
load_default_window_switcher_fields();
}
if (rc.mag_scale <= 0.0) {
rc.mag_scale = 1.0;
}
}
static void