From: Jens Peters Date: Fri, 6 Jun 2025 05:14:21 +0000 (+0200) Subject: input: always use mouse emulation for tablet tool mouse X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=8584e073de23d81d895eeb7e673f6f24e5375f5b;p=proto%2Flabwc.git input: always use mouse emulation for tablet tool mouse Using mouse emulation for a tablet tool mouse is just a practical decision to let such a tool work more smootly, e.g. it avoids weird menu issues in GTK applications. Since such a tool doesn't have pen specifix axis like pressure or distance, no functionality is lost. A solution fully in line with the protocol, which would pass the tool mouse buttons to the client, would leave us with e.g. non-working buttons in current GTK4 since they don't handle the buttons reported from the tool mouse. May be this changes in future. But for now, let's just be practical. --- diff --git a/src/input/tablet.c b/src/input/tablet.c index dbb905d8..314e5e46 100644 --- a/src/input/tablet.c +++ b/src/input/tablet.c @@ -273,8 +273,13 @@ handle_tablet_tool_proximity(struct wl_listener *listener, void *data) * enforced. Not having a tool or tablet capable surface will trigger * the fallback to cursor move/button emulation in the tablet signal * handlers. + * Also stick to mouse emulation when the current tool is a tablet mouse. + * Client support for tablet mouses in tablet mode is often incomplete + * and no functionality is lost since those device do not support tool + * specific axis like pressure or distance. */ if (!rc.tablet.force_mouse_emulation + && ev->tool->type != WLR_TABLET_TOOL_TYPE_MOUSE && tablet->seat->server->tablet_manager && !tool) { /* * Unfortunately `wlr_tool` is only present in the events, so