[feat] synchronize remote cursor state

This commit is contained in:
dijunkun
2026-08-25 22:25:18 +08:00
parent b854512c24
commit bd73ef55f1
12 changed files with 503 additions and 1 deletions
+10
View File
@@ -249,6 +249,11 @@ void PeerEventHandler::OnConnectionStatus(ConnectionStatus status,
switch (status) {
case ConnectionStatus::Connected: {
runtime->ResetRemoteServiceStatus(*props);
{
std::lock_guard lock(props->remote_cursor_state_mutex_);
props->remote_cursor_state_ = {};
props->remote_cursor_state_received_ = false;
}
{
RemoteAction remote_action;
remote_action.i.display_num =
@@ -313,6 +318,11 @@ void PeerEventHandler::OnConnectionStatus(ConnectionStatus status,
props->connection_established_ = false;
props->enable_mouse_control_ = false;
runtime->ResetRemoteServiceStatus(*props);
{
std::lock_guard lock(props->remote_cursor_state_mutex_);
props->remote_cursor_state_ = {};
props->remote_cursor_state_received_ = false;
}
std::shared_ptr<std::vector<unsigned char>> native_snapshot;
int native_snapshot_width = 0;