Optimize the code based on the suggestions

This commit is contained in:
SnowNF 2024-03-20 11:31:42 +08:00 committed by Johan Malm
parent bd4d92bad8
commit fb921ab431
4 changed files with 22 additions and 8 deletions

View file

@ -238,8 +238,9 @@ configure_libinput(struct wlr_input_device *wlr_input_device)
libinput_device_config_send_events_set_mode(libinput_dev, dc->send_events_mode);
}
/* Non-zero if the device can be calibrated, zero otherwise. */
if (libinput_device_config_calibration_has_matrix(libinput_dev) == 0
|| dc->no_calibration_matrix) {
|| !dc->have_calibration_matrix) {
wlr_log(WLR_INFO, "calibration matrix not configured");
} else {
wlr_log(WLR_INFO, "calibration matrix configured");