mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 12:15:34 +08:00
[fix] fix mouse click event sending when control bar hovered
This commit is contained in:
@@ -114,6 +114,7 @@ int Render::ControlWindow() {
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
ControlBar();
|
||||
control_bar_hovered_ = ImGui::IsWindowHovered();
|
||||
|
||||
ImGui::EndChild();
|
||||
ImGui::End();
|
||||
|
||||
@@ -181,7 +181,7 @@ class Render {
|
||||
bool exit_ = false;
|
||||
bool exit_video_window_ = false;
|
||||
bool connection_established_ = false;
|
||||
bool subwindow_hovered_ = false;
|
||||
bool control_bar_hovered_ = false;
|
||||
bool connect_button_pressed_ = false;
|
||||
bool password_validating_ = false;
|
||||
uint32_t password_validating_time_ = 0;
|
||||
|
||||
@@ -45,7 +45,7 @@ int Render::ProcessMouseKeyEven(SDL_Event &ev) {
|
||||
} else if (SDL_BUTTON_RIGHT == ev.button.button) {
|
||||
remote_action.m.flag = MouseFlag::right_down;
|
||||
}
|
||||
if (subwindow_hovered_) {
|
||||
if (control_bar_hovered_) {
|
||||
remote_action.m.flag = MouseFlag::move;
|
||||
}
|
||||
SendData(peer_, DATA_TYPE::DATA, (const char *)&remote_action,
|
||||
@@ -57,7 +57,7 @@ int Render::ProcessMouseKeyEven(SDL_Event &ev) {
|
||||
} else if (SDL_BUTTON_RIGHT == ev.button.button) {
|
||||
remote_action.m.flag = MouseFlag::right_up;
|
||||
}
|
||||
if (subwindow_hovered_) {
|
||||
if (control_bar_hovered_) {
|
||||
remote_action.m.flag = MouseFlag::move;
|
||||
}
|
||||
SendData(peer_, DATA_TYPE::DATA, (const char *)&remote_action,
|
||||
|
||||
Reference in New Issue
Block a user