-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate "linux/my_application.cc" modification #14
Comments
Technically, it should be enough to move diff --git a/linux/my_application.cc b/linux/my_application.cc
index 6f18193..6900d28 100644
--- a/linux/my_application.cc
+++ b/linux/my_application.cc
@@ -48,7 +48,6 @@ static void my_application_activate(GApplication* application) {
}
gtk_window_set_default_size(window, 1280, 720);
- gtk_widget_show(GTK_WIDGET(window));
g_autoptr(FlDartProject) project = fl_dart_project_new();
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
@@ -59,6 +58,7 @@ static void my_application_activate(GApplication* application) {
fl_register_plugins(FL_PLUGIN_REGISTRY(view));
+ gtk_widget_show(GTK_WIDGET(window));
gtk_widget_grab_focus(GTK_WIDGET(view));
}
However, the As a workaround, moving diff --git a/linux/my_application.cc b/linux/my_application.cc
index 6f18193..3e5ee2b 100644
--- a/linux/my_application.cc
+++ b/linux/my_application.cc
@@ -48,17 +48,17 @@ static void my_application_activate(GApplication* application) {
}
gtk_window_set_default_size(window, 1280, 720);
- gtk_widget_show(GTK_WIDGET(window));
g_autoptr(FlDartProject) project = fl_dart_project_new();
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
FlView* view = fl_view_new(project);
- gtk_widget_show(GTK_WIDGET(view));
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
fl_register_plugins(FL_PLUGIN_REGISTRY(view));
+ gtk_widget_show(GTK_WIDGET(window));
+ gtk_widget_show(GTK_WIDGET(view));
gtk_widget_grab_focus(GTK_WIDGET(view));
}
I somehow didn't feel like this was a pretty enough solution for proposing a change to the official Flutter app template. I'd much rather fix |
Hmm okay, understandable. |
I have a fix proposal that feels reasonable: jpnurmi/engine@cf68162. It's probably going to be more effort to write a PR description. :) |
Hey,
I was thinking about automating the required modification in
linux/my_application.cc
for easier use.Do you think having the change (switching the lines) can do any potential harm to an application that don't use handy_window?
Because otherwise the easiest way to do that is probably just changing the default my_application.cc
The text was updated successfully, but these errors were encountered: