Ignore non-owner client input policy updates
Some checks failed
ci-bundle.yml / Ignore non-owner client input policy updates (push) Failing after 0s
ci-copr.yml / Ignore non-owner client input policy updates (push) Failing after 0s
ci-homebrew.yml / Ignore non-owner client input policy updates (push) Failing after 0s

This commit is contained in:
Joey Yakimowich-Payne 2026-02-12 09:11:55 -07:00
commit 808d868b8e

View file

@ -1171,12 +1171,19 @@ namespace stream {
}
auto *policy = (const control_set_input_policy_t *) payload.data();
apply_session_input_policy(
session,
policy->allow_keyboard != 0,
policy->allow_mouse != 0,
policy->allow_gamepad != 0,
policy->reason);
bool is_owner_session = session->input_policy.is_owner_session.load(std::memory_order_relaxed);
if (!is_owner_session) {
BOOST_LOG(info)
<< "Ignoring client input policy update from non-owner session [id="sv << session->launch_session_id
<< ", client="sv << session->client_unique_id << "]"sv;
} else {
apply_session_input_policy(
session,
policy->allow_keyboard != 0,
policy->allow_mouse != 0,
policy->allow_gamepad != 0,
policy->reason);
}
if (send_session_input_policy(session, INPUT_POLICY_REASON_HOST_ACK)) {
BOOST_LOG(warning) << "Unable to send input policy acknowledgment"sv;