mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
1.The mouse control button allowed to be clicked Only when connection established; 2.Fix display resolution error after exit fullscreen
This commit is contained in:
@@ -532,10 +532,11 @@ int MainWindow::Run() {
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
// Mouse control
|
||||||
if (ImGui::Button(mouse_control_button_label_.c_str())) {
|
if (ImGui::Button(mouse_control_button_label_.c_str())) {
|
||||||
if (mouse_control_button_label_ ==
|
if (mouse_control_button_label_ ==
|
||||||
localization::control_mouse[localization_language_index_]) {
|
localization::control_mouse[localization_language_index_] &&
|
||||||
|
connection_established_) {
|
||||||
mouse_control_button_pressed_ = true;
|
mouse_control_button_pressed_ = true;
|
||||||
control_mouse_ = true;
|
control_mouse_ = true;
|
||||||
mouse_control_button_label_ =
|
mouse_control_button_label_ =
|
||||||
@@ -548,7 +549,7 @@ int MainWindow::Run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
// Fullscreen
|
||||||
if (ImGui::Button(fullscreen_button_label_.c_str())) {
|
if (ImGui::Button(fullscreen_button_label_.c_str())) {
|
||||||
if (fullscreen_button_label_ ==
|
if (fullscreen_button_label_ ==
|
||||||
localization::fullscreen[localization_language_index_]) {
|
localization::fullscreen[localization_language_index_]) {
|
||||||
@@ -561,6 +562,8 @@ int MainWindow::Run() {
|
|||||||
SDL_SetWindowFullscreen(main_window_, SDL_FALSE);
|
SDL_SetWindowFullscreen(main_window_, SDL_FALSE);
|
||||||
SDL_SetWindowSize(main_window_, main_window_width_before_fullscreen_,
|
SDL_SetWindowSize(main_window_, main_window_width_before_fullscreen_,
|
||||||
main_window_height_before_fullscreen_);
|
main_window_height_before_fullscreen_);
|
||||||
|
main_window_width_ = main_window_width_before_fullscreen_;
|
||||||
|
main_window_height_ = main_window_height_before_fullscreen_;
|
||||||
fullscreen_button_label_ =
|
fullscreen_button_label_ =
|
||||||
localization::fullscreen[localization_language_index_];
|
localization::fullscreen[localization_language_index_];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user