From 6daba4cfd32886b0aa4da1473f11e41c910aea25 Mon Sep 17 00:00:00 2001 From: sakurawald Date: Wed, 20 Nov 2024 22:50:33 +0800 Subject: [PATCH] fix: ensure the maximize/minimize-frame command are executed in sdl2 main thread. --- frontends/sdl2/frame.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontends/sdl2/frame.lisp b/frontends/sdl2/frame.lisp index d32fe6e8f..4a0ccfca3 100644 --- a/frontends/sdl2/frame.lisp +++ b/frontends/sdl2/frame.lisp @@ -6,9 +6,11 @@ (define-command maximize-frame () () "Maximize the frame." - (sdl2:maximize-window (lem-sdl2/display::display-window (lem-sdl2/display:current-display)))) + (sdl2:in-main-thread () + (sdl2:maximize-window (lem-sdl2/display::display-window (lem-sdl2/display:current-display))))) (define-command minimize-frame () () "Minimize the frame." - (sdl2:minimize-window (lem-sdl2/display::display-window (lem-sdl2/display:current-display)))) + (sdl2:in-main-thread () + (sdl2:minimize-window (lem-sdl2/display::display-window (lem-sdl2/display:current-display))))) \ No newline at end of file