Skip to content

Commit

Permalink
apps: daemon: Actually disable touch / stylus if the config option is…
Browse files Browse the repository at this point in the history
… set

This was an oversight during the refactoring, the variable was checked
to warn the user, but the device was not actually disabled.
  • Loading branch information
StollD committed Apr 25, 2023
1 parent dd2afbb commit 2849913
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/apps/daemon/daemon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class Daemon : public core::Application {

void on_contacts(const std::vector<contacts::Contact<f64>> &contacts) override
{
if (m_config.touch_disable)
return;

// Enable the touchscreen if it was disabled by a stylus that is no longer active.
if (m_config.touch_disable_on_stylus && !m_stylus.active() && !m_touch.enabled())
m_touch.enable();
Expand All @@ -55,6 +58,9 @@ class Daemon : public core::Application {

void on_stylus(const ipts::StylusData &stylus) override
{
if (m_config.stylus_disable)
return;

if (m_config.touch_disable_on_stylus && m_touch.enabled())
m_touch.disable();

Expand Down

0 comments on commit 2849913

Please sign in to comment.