diff --git a/Desktop_Test/shell.cpp b/Desktop_Test/shell.cpp index b65eef2..bff42a4 100644 --- a/Desktop_Test/shell.cpp +++ b/Desktop_Test/shell.cpp @@ -241,12 +241,12 @@ int Shell::handle_window_click(CLICK_EVENT event) { int x = window->x + it->x_offset; int y = window->y + it->y_offset; - if (event.x >= x && event.x <= (x + it->width) && event.y >= y && event.y <= (y + it->height) && it->action == WindowAction::CLOSE) { + if (event.x >= x && event.x <= (x + it->width) && event.y >= y && event.y <= (y + it->height) && it->action == WindowAction::CLOSE && !window->minimized) { close_window(window->id); return window->id; } - if (event.x >= x && event.x <= (x + it->width) && event.y >= y && event.y <= (y + it->height) && it->action == WindowAction::MINIMIZE) { + if (event.x >= x && event.x <= (x + it->width) && event.y >= y && event.y <= (y + it->height) && it->action == WindowAction::MINIMIZE && !window->minimized) { minimize_window(window->id); return window->id; }