[Linux] Fix minimize to tray (silent start) option #1438
Merged
+3
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the
window_manager
documentation, to start a window in hidden mode, we need to usegtk_widget_realize
instead ofgtk_widget_show
to create the window widget. But since Flutter 3.24, this is broken (I checked and it is indeed broken) leanflutter/window_manager#179 (comment). The solution is to callgtk_widget_hide
immediately after callingfl_register_plugins
. In this case, the window is correctly minimized. I demonstrated the window operation with and without the minimize to tray option on the video (build and run steps are cut off).screencast.mp4
Close #1437