mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-19 13:59:10 +08:00
Compare commits
3 Commits
fix/macos-
...
v1.1.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a964c6bbf5 | ||
|
|
239da373d0 | ||
|
|
217cfb091d |
@@ -101,7 +101,15 @@ int Render::RemoteWindow() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check every 1 second for rejoin
|
||||||
if (need_to_rejoin_) {
|
if (need_to_rejoin_) {
|
||||||
|
auto now = std::chrono::steady_clock::now();
|
||||||
|
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
|
now - last_rejoin_check_time_)
|
||||||
|
.count();
|
||||||
|
|
||||||
|
if (elapsed >= 1000) {
|
||||||
|
last_rejoin_check_time_ = now;
|
||||||
need_to_rejoin_ = false;
|
need_to_rejoin_ = false;
|
||||||
for (const auto& [_, props] : client_properties_) {
|
for (const auto& [_, props] : client_properties_) {
|
||||||
if (props->rejoin_) {
|
if (props->rejoin_) {
|
||||||
@@ -111,6 +119,7 @@ int Render::RemoteWindow() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ SDL_HitTestResult Render::HitTestCallback(SDL_Window* window,
|
|||||||
return SDL_HITTEST_NORMAL;
|
return SDL_HITTEST_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Render::Render() {}
|
Render::Render() : last_rejoin_check_time_(std::chrono::steady_clock::now()) {}
|
||||||
|
|
||||||
Render::~Render() {}
|
Render::~Render() {}
|
||||||
|
|
||||||
@@ -1011,6 +1011,8 @@ int Render::Run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
InitializeLogger();
|
InitializeLogger();
|
||||||
|
LOG_INFO("CrossDesk version: {}", CROSSDESK_VERSION);
|
||||||
|
|
||||||
InitializeSettings();
|
InitializeSettings();
|
||||||
InitializeSDL();
|
InitializeSDL();
|
||||||
InitializeModules();
|
InitializeModules();
|
||||||
|
|||||||
@@ -379,6 +379,7 @@ class Render {
|
|||||||
int audio_len_ = 0;
|
int audio_len_ = 0;
|
||||||
bool audio_buffer_fresh_ = false;
|
bool audio_buffer_fresh_ = false;
|
||||||
bool need_to_rejoin_ = false;
|
bool need_to_rejoin_ = false;
|
||||||
|
std::chrono::steady_clock::time_point last_rejoin_check_time_;
|
||||||
bool just_created_ = false;
|
bool just_created_ = false;
|
||||||
std::string controlled_remote_id_ = "";
|
std::string controlled_remote_id_ = "";
|
||||||
std::string focused_remote_id_ = "";
|
std::string focused_remote_id_ = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user