mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[fix] fix title bar icon error when leaves maximized state
This commit is contained in:
@@ -553,6 +553,10 @@ int Render::Run() {
|
||||
LOG_INFO("Quit program");
|
||||
exit_ = true;
|
||||
}
|
||||
} else if (event.window.event == SDL_WINDOWEVENT_MAXIMIZED) {
|
||||
} else if (event.window.event == SDL_WINDOWEVENT_MINIMIZED) {
|
||||
} else if (event.window.event == SDL_WINDOWEVENT_RESTORED) {
|
||||
window_maximized_ = false;
|
||||
} else if (event.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
|
||||
SDL_GetWindowSize(main_window_, &main_window_width_,
|
||||
&main_window_height_);
|
||||
|
||||
@@ -94,7 +94,7 @@ int Render::TitleBar() {
|
||||
if (ImGui::Button(window_restore_button.c_str(),
|
||||
ImVec2(BUTTON_PADDING, 30))) {
|
||||
SDL_RestoreWindow(main_window_);
|
||||
window_maximized_ = !window_maximized_;
|
||||
window_maximized_ = false;
|
||||
}
|
||||
draw_list->AddRect(ImVec2(pos_x_top, pos_y_top),
|
||||
ImVec2(pos_x_top + 12, pos_y_top + 12),
|
||||
|
||||
Reference in New Issue
Block a user