5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-19 02:19:31 +08:00

Improve min/maximise

This commit is contained in:
Lea Anthony 2020-11-15 12:00:57 +11:00
parent cd03b4b633
commit b32349effe
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -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;