Skip to content

Commit

Permalink
Merge pull request #1438 from proninyaroslav/linux-fix-silent
Browse files Browse the repository at this point in the history
[Linux] Fix minimize to tray (silent start) option
  • Loading branch information
hiddify-com authored Oct 29, 2024
2 parents 0f6b150 + 06a5424 commit 0144cdd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion linux/my_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ static void my_application_activate(GApplication *application)
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));

fl_register_plugins(FL_PLUGIN_REGISTRY(view));
// Flutter 3.24 breaks the gtk_widget_realize solution: https://github.com/leanflutter/window_manager/issues/179#issuecomment-2299534856
gtk_widget_hide(GTK_WIDGET(window));

gtk_widget_grab_focus(GTK_WIDGET(view));

Expand Down Expand Up @@ -137,6 +139,6 @@ MyApplication *my_application_new()
{
return MY_APPLICATION(g_object_new(my_application_get_type(),
"application-id", APPLICATION_ID,
"flags", G_APPLICATION_FLAGS_NONE,
"flags", G_APPLICATION_DEFAULT_FLAGS,
nullptr));
}

0 comments on commit 0144cdd

Please sign in to comment.