From aac26f012ef1108fe569f2e8115096b4fa47335f Mon Sep 17 00:00:00 2001 From: rasmus Date: Sun, 21 Dec 2025 21:04:41 +0100 Subject: [PATCH] You can no longer close a minimized program by pressing left click on a minimized close button lol --- Desktop_Test/shell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }