From b32349effe859f695562a068f98e6b636d36b875 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 15 Nov 2020 12:00:57 +1100 Subject: [PATCH] Improve min/maximise --- v2/internal/ffenestri/ffenestri_darwin.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/v2/internal/ffenestri/ffenestri_darwin.c b/v2/internal/ffenestri/ffenestri_darwin.c index 22c9e4c7b..5f64bf0cc 100644 --- a/v2/internal/ffenestri/ffenestri_darwin.c +++ b/v2/internal/ffenestri/ffenestri_darwin.c @@ -472,23 +472,16 @@ void Unmaximise(struct Application *app) { } } -void ToggleMinimise(struct Application *app) { - ON_MAIN_THREAD( - MAIN_WINDOW_CALL(app->minimised ? "deminiaturize:" : "miniaturize:" ); - app->minimised = !app->minimised; - ); -} - void Minimise(struct Application *app) { - if( app->minimised == 0) { - ToggleMinimise(app); - } + ON_MAIN_THREAD( + MAIN_WINDOW_CALL("miniaturize:"); + ); } void Unminimise(struct Application *app) { - if( app->minimised == 1) { - ToggleMinimise(app); - } - } + ON_MAIN_THREAD( + MAIN_WINDOW_CALL("deminiaturize:"); + ); +} id getCurrentScreen(struct Application *app) { id screen = NULL;