magnifier: make sure magnifier scale is bigger than 1.0

This commit is contained in:
tokyo4j 2025-02-23 14:05:45 +09:00
parent f9d6fcb1e4
commit a40c779e59

View file

@ -1267,8 +1267,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);
}
@ -1775,10 +1777,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