Default is off. Also allow switching with reconfigure.
/* graphics tablet */
struct tablet_config {
+ bool force_mouse_emulation;
char *output_name;
struct wlr_fbox box;
enum rotation rotation;
} else {
wlr_log(WLR_ERROR, "Invalid value for <resize popupShow />");
}
+ } else if (!strcasecmp(nodename, "mouseEmulation.tablet")) {
+ set_bool(content, &rc.tablet.force_mouse_emulation);
} else if (!strcasecmp(nodename, "mapToOutput.tablet")) {
rc.tablet.output_name = xstrdup(content);
} else if (!strcasecmp(nodename, "rotate.tablet")) {
rc.doubleclick_time = 500;
rc.scroll_factor = 1.0;
+ rc.tablet.force_mouse_emulation = false;
rc.tablet.output_name = NULL;
rc.tablet.rotation = 0;
rc.tablet.box = (struct wlr_fbox){0};
rc.tablet.box, x, y);
adjust_for_rotation(rc.tablet.rotation, x, y);
- if (!tablet->tablet_v2) {
+ if (rc.tablet.force_mouse_emulation
+ || !tablet->tablet_v2) {
return NULL;
}
double x, y;
struct wlr_surface *surface = tablet_get_coords(tablet, &x, &y);
- if (tablet->seat->server->tablet_manager && !tool) {
+ if (!rc.tablet.force_mouse_emulation
+ && tablet->seat->server->tablet_manager && !tool) {
/*
* Unfortunately `wlr_tool` is only present in the events, so
* use proximity for creating a `wlr_tablet_v2_tablet_tool`.