Skip to content

Commit

Permalink
[Linux] Fix minimize to tray if the option is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
proninyaroslav committed Oct 25, 2024
1 parent 350fc6d commit 06a5424
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 06a5424

Please sign in to comment.