mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[fix] only receive remote host info once
This commit is contained in:
@@ -62,7 +62,6 @@ int MouseController::SendMouseCommand(RemoteAction remote_action,
|
|||||||
ip.mi.time = 0;
|
ip.mi.time = 0;
|
||||||
|
|
||||||
SetCursorPos(ip.mi.dx, ip.mi.dy);
|
SetCursorPos(ip.mi.dx, ip.mi.dy);
|
||||||
LOG_ERROR("mouse {}x{}", ip.mi.dx, ip.mi.dy);
|
|
||||||
|
|
||||||
if (ip.mi.dwFlags != MOUSEEVENTF_MOVE) {
|
if (ip.mi.dwFlags != MOUSEEVENTF_MOVE) {
|
||||||
SendInput(1, &ip, sizeof(INPUT));
|
SendInput(1, &ip, sizeof(INPUT));
|
||||||
|
|||||||
@@ -269,7 +269,8 @@ void Render::OnReceiveDataBufferCb(const char *data, size_t size,
|
|||||||
auto props = render->client_properties_.find(remote_id)->second;
|
auto props = render->client_properties_.find(remote_id)->second;
|
||||||
RemoteAction host_info;
|
RemoteAction host_info;
|
||||||
if (DeserializeRemoteAction(data, size, host_info)) {
|
if (DeserializeRemoteAction(data, size, host_info)) {
|
||||||
if (ControlType::host_infomation == host_info.type) {
|
if (ControlType::host_infomation == host_info.type &&
|
||||||
|
props->remote_host_name_.empty()) {
|
||||||
props->remote_host_name_ =
|
props->remote_host_name_ =
|
||||||
std::string(host_info.i.host_name, host_info.i.host_name_size);
|
std::string(host_info.i.host_name, host_info.i.host_name_size);
|
||||||
LOG_INFO("Remote hostname: [{}]", props->remote_host_name_);
|
LOG_INFO("Remote hostname: [{}]", props->remote_host_name_);
|
||||||
|
|||||||
2
thirdparty/projectx
vendored
2
thirdparty/projectx
vendored
Submodule thirdparty/projectx updated: 20c6ee11f6...9ee3bec9df
Reference in New Issue
Block a user