@@ -115,6 +115,9 @@ anbox::cmds::SessionManager::SessionManager()
115115 flag (cli::make_flag (cli::Name{" no-touch-emulation" },
116116 cli::Description{" Disable touch emulation applied on mouse inputs" },
117117 no_touch_emulation_));
118+ flag (cli::make_flag (cli::Name{" server-side-decoration" },
119+ cli::Description{" Prefer to use server-side decoration instead of client-side decoration" },
120+ server_side_decoration_));
118121
119122 action ([this ](const cli::Command::Context &) {
120123 auto trap = core::posix::trap_signals_for_process (
@@ -161,10 +164,15 @@ anbox::cmds::SessionManager::SessionManager()
161164 if (should_enable_touch_emulation == " false" || no_touch_emulation_)
162165 no_touch_emulation_ = true ;
163166
167+ const auto should_force_server_side_decoration = utils::get_env_value (" ANBOX_FORCE_SERVER_SIDE_DECORATION" , " false" );
168+ if (should_force_server_side_decoration == " true" )
169+ server_side_decoration_ = true ;
170+
164171 platform::Configuration platform_config;
165172 platform_config.single_window = single_window_;
166173 platform_config.no_touch_emulation = no_touch_emulation_;
167174 platform_config.display_frame = display_frame;
175+ platform_config.server_side_decoration = server_side_decoration_;
168176
169177 auto platform = platform::create (utils::get_env_value (" ANBOX_PLATFORM" , " sdl" ),
170178 input_manager,
@@ -259,6 +267,9 @@ anbox::cmds::SessionManager::SessionManager()
259267 // See https://github.com/anbox/anbox/issues/780 for further details.
260268 container_configuration.extra_properties .push_back (" ro.boot.fake_battery=1" );
261269
270+ if (server_side_decoration_)
271+ container_configuration.extra_properties .push_back (" ro.anbox.no_decorations=1" );
272+
262273 if (!standalone_) {
263274 container_configuration.bind_mounts = {
264275 {qemu_pipe_connector->socket_file (), " /dev/qemu_pipe" },
0 commit comments