[x11] Move the user-defined pattern to detect pens to TabletOptions

This commit is contained in:
David Capello 2024-06-18 15:18:08 -03:00
parent 7d63ceb199
commit f21c9f2dce
2 changed files with 5 additions and 8 deletions

2
laf

@ -1 +1 @@
Subproject commit b5e0ac9598f3ed75d0ef6857ac28b9f0d2b475a6
Subproject commit ca7739de757ad098e28e33a5e0645b6852c1e929

View File

@ -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);