Skip to content

Commit

Permalink
opt: hidden at launch on linux and macos
Browse files Browse the repository at this point in the history
  • Loading branch information
No06 committed Aug 16, 2024
1 parent 38366a2 commit f7ef8a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion linux/my_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void my_application_activate(GApplication* application) {
}

gtk_window_set_default_size(window, 400, 777);
gtk_widget_show(GTK_WIDGET(window));
gtk_widget_realize(GTK_WIDGET(window));

g_autoptr(FlDartProject) project = fl_dart_project_new();
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
Expand Down
6 changes: 6 additions & 0 deletions macos/Runner/MainFlutterWindow.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Cocoa
import FlutterMacOS
import window_manager

class MainFlutterWindow: NSWindow {
override func awakeFromNib() {
Expand All @@ -18,4 +19,9 @@ class MainFlutterWindow: NSWindow {

super.awakeFromNib()
}

override public func order(_ place: NSWindow.OrderingMode, relativeTo otherWin: Int) {
super.order(place, relativeTo: otherWin)
hiddenWindowAtLaunch()
}
}

0 comments on commit f7ef8a3

Please sign in to comment.