Fix #118233: No preference to disable multi-touch gestures on Wayland

Support this preference for Wayland, following macOS & WIN32 support.
This commit is contained in:
Campbell Barton
2024-02-17 14:50:59 +11:00
parent 6508ed8a3f
commit a8ca12f2a8
3 changed files with 140 additions and 63 deletions

View File

@@ -1737,7 +1737,15 @@ class USERPREF_PT_input_touchpad(InputPanel, CenterAlignMixIn, Panel):
@classmethod
def poll(cls, context):
import sys
return sys.platform[:3] == "win" or sys.platform == "darwin"
if sys.platform[:3] == "win" or sys.platform == "darwin":
return True
# WAYLAND supports multi-touch, X11 and SDL don't.
from _bpy import _ghost_backend
if _ghost_backend() == 'WAYLAND':
return True
return False
def draw_centered(self, context, layout):
prefs = context.preferences