Summary: | Touchpad "Disable while typing" setting interferes with full-screen games played with a touchpad | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Adam Fontenot <adam.m.fontenot+kde> |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | fanzhuyifan, natalie_clarius, nate, xaver.hugl |
Priority: | NOR | Keywords: | wayland |
Version: | 6.1.3 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=489189 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Adam Fontenot
2024-08-03 21:26:52 UTC
Are you attempting to move your cursor via the touchpad in game? If so your touchpad is being disabled while typing. (In reply to fanzhuyifan from comment #1) > Are you attempting to move your cursor via the touchpad in game? If so your > touchpad is being disabled while typing. Yes - that's the specific issue I'm reporting here. This breaks virtually every full screen game that relies on a mouse / touchpad. This didn't happen before (probably because the games exclusively locked the input devices under X, but not Wayland?), and my reasoning is that since KWin does compositing for all windows under Wayland, Plasma should disable this setting for windows that are fullscreen. The problem here is that we don't know if a full-screen window is a game or not. So the setting is pretty dumb and it can't figure out whether applying it to any given context makes sense or not. If you play video games, at the moment the safest thing is to disable the setting entirely. In principle we could make the feature auto-disable itself when in a fullscreen window, on the logic that it *might* be a game, but this might be unexpected or disruptive to people who don't play games. The warning I added for 6.2.0 might help, but clearly it isn't enough. The issue is deeper than that - like many input features, this isn't actually something done by KWin, but by libinput. So this would kind of require implementing the feature in KWin first (which should be quite straight forward, but I haven't tried). If we had that though, we could do something about this in many cases. I can think of two approaches: 1. don't disable the touchpad if we detect the focused app is in the game category (in the .desktop file), or the Wayland content type is "game" - and you're not typing into a text field 2. only disable the touchpad if we know you're actually typing into a text field. This is trivial with Wayland apps, not sure it's feasible for X11 apps Neither is completely bullet proof, but I think with option 1 we could at least make the issue less severe. My thinking was that since Plasma controls the setting, you could just turn it off in libinput and then turn it back on again when the program closes. I suppose there might be reasons not to do that, e.g. if KWin crashes or something? To the extent that libinput lacks support for compositors changing settings like this one on a temporary basis, that might arguably be a bug in libinput. I think there's a Wayland protocol that would solve this problem (https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/110) but it looks to be stalled. |