labwc/src/config/tablet-tool.c

18 lines
452 B
C
Raw Normal View History

// SPDX-License-Identifier: GPL-2.0-only
#define _POSIX_C_SOURCE 200809L
#include "config/tablet-tool.h"
#include <strings.h>
#include <wlr/util/log.h>
2025-08-17 16:01:50 -04:00
enum lab_motion
tablet_parse_motion(const char *name)
{
if (!strcasecmp(name, "Absolute")) {
2025-08-17 16:01:50 -04:00
return LAB_MOTION_ABSOLUTE;
} else if (!strcasecmp(name, "Relative")) {
2025-08-17 16:01:50 -04:00
return LAB_MOTION_RELATIVE;
}
wlr_log(WLR_ERROR, "Invalid value for tablet motion: %s", name);
2025-08-17 16:01:50 -04:00
return LAB_MOTION_ABSOLUTE;
}