Skip to content

Commit

Permalink
added snap configuration option touch-emulation.enable
Browse files Browse the repository at this point in the history
  • Loading branch information
salvprest committed Apr 25, 2019
1 parent 8d8adcb commit ae41a24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/snap-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,8 @@ if [ "$(snapctl get software-rendering.enable)" = true ]; then
export ANBOX_FORCE_SOFTWARE_RENDERING=true
fi

if [ "$(snapctl get touch-emulation.enable)" = false ]; then
export ANBOX_ENABLE_TOUCH_EMULATION=false
fi

exec "$SNAP"/usr/bin/anbox "$@"
4 changes: 4 additions & 0 deletions src/anbox/cmds/session_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ anbox::cmds::SessionManager::SessionManager()
if (single_window_)
display_frame = window_size_;

const auto should_enable_touch_emulation = utils::get_env_value("ANBOX_ENABLE_TOUCH_EMULATION", "true");
if (should_enable_touch_emulation == "false" || no_touch_emulation_)
no_touch_emulation_ = true;

platform::Configuration platform_config;
platform_config.single_window = single_window_;
platform_config.no_touch_emulation = no_touch_emulation_;
Expand Down

0 comments on commit ae41a24

Please sign in to comment.