mirror of
https://github.com/games-on-whales/inputtino.git
synced 2026-10-15 12:52:02 +00:00
[PR #36] [MERGED] fix(touchscreen): remove BTN_LEFT from virtual touchscreen #39
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/inputtino#39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/inputtino/pull/36
Author: @htrex
Created: 3/18/2026
Status: ✅ Merged
Merged: 3/18/2026
Merged by: @ABeltramo
Base:
stable← Head:fix/touchscreen-remove-btn-left📝 Commits (1)
ef30163fix(touchscreen): remove BTN_LEFT from virtual touchscreen device📊 Changes
1 file changed (+0 additions, -1 deletions)
View changed files
📝
src/uinput/touchscreen.cpp(+0 -1)📄 Description
Problem
The virtual touchscreen created by
create_touch_screen()registersBTN_LEFTalongsideBTN_TOUCH. Real touchscreen hardware only reportsBTN_TOUCH—BTN_LEFTis a mouse button.This causes GNOME/Mutter on Wayland to misclassify the device as a pointer, which breaks touchscreen-to-display mapping (dconf
outputsetting is ignored).Root cause chain
udev
input_id(systemd source):BTN_LEFT(=BTN_MOUSE) +ABS_X/Y→is_abs_mouse = true. This check runs before theis_touchscreencheck, so the device gets bothID_INPUT_MOUSE=1andID_INPUT_TOUCHSCREEN=1.libinput: dual udev tags → device gets both
pointerandtouchcapabilities.Mutter
determine_device_type()(mutter source): checksLIBINPUT_DEVICE_CAP_POINTERbeforeLIBINPUT_DEVICE_CAP_TOUCH→ device is classified asCLUTTER_POINTER_DEVICE.Mutter
meta-input-mapper.c:get_device_settings()only reads dconf touchscreen-to-display mapping forCLUTTER_TOUCHSCREEN_DEVICE— pointer devices get no mapping → touch events go to the wrong display.Fix
Remove
BTN_LEFTfromcreate_touch_screen(). It was never emitted anyway —place_finger()andrelease_finger()only writeABS_MT_*,ABS_PRESSURE, andBTN_TOUCHevents. Likely a leftover from the mouse device template.Verified
Tested with Sunshine + Moonlight (PR #1364 native multitouch) streaming to an Android tablet as a third display on GNOME 49 / Wayland. Without
BTN_LEFT:ID_INPUT_TOUCHSCREEN=1touchcapabilityCLUTTER_TOUCHSCREEN_DEVICE→ dconf mapping works🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.