From f21c9f2dcefd5997f2b2e1cfbe0bcc92eb73eec8 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 18 Jun 2024 15:18:08 -0300 Subject: [PATCH] [x11] Move the user-defined pattern to detect pens to TabletOptions --- laf | 2 +- src/app/app.cpp | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/laf b/laf index b5e0ac959..ca7739de7 160000 --- a/laf +++ b/laf @@ -1 +1 @@ -Subproject commit b5e0ac9598f3ed75d0ef6857ac28b9f0d2b475a6 +Subproject commit ca7739de757ad098e28e33a5e0645b6852c1e929 diff --git a/src/app/app.cpp b/src/app/app.cpp index b3a537fc7..6899b516d 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -285,9 +285,10 @@ int App::initialize(const AppOptions& options) auto& pref = preferences(); + os::TabletOptions tabletOptions; + #if LAF_WINDOWS - os::TabletOptions tabletOptions; if (options.disableWintab() || !pref.experimental.loadWintabDriver() || pref.tablet.api() == "pointer") { @@ -300,7 +301,6 @@ int App::initialize(const AppOptions& options) tabletOptions.api = os::TabletAPI::Wintab; } tabletOptions.setCursorFix = pref.tablet.setCursorFix(); - system->setTabletOptions(tabletOptions); #elif LAF_MACOS @@ -309,14 +309,11 @@ int App::initialize(const AppOptions& options) #elif LAF_LINUX - { - const std::string& stylusId = pref.general.x11StylusId(); - if (!stylusId.empty()) - os::x11_set_user_defined_string_to_detect_stylus(stylusId); - } + tabletOptions.detectStylusPattern = pref.general.x11StylusId(); #endif + system->setTabletOptions(tabletOptions); system->setAppName(get_app_name()); system->setAppMode(m_isGui ? os::AppMode::GUI: os::AppMode::CLI);