Skip to content

Commit 3678a0a

Browse files
authored
Initialize window_hints to fix minimum size setting in release mode (#510)
When compiling in release mode for linux, the window size constraints (ie. `setMinimumSize`) weren't being enforced. This happened because the `window_hints` variable was not initialized and contained garbage data (while it was zero in debug mode).
1 parent a911310 commit 3678a0a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/window_manager/linux/window_manager_plugin.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ void window_manager_plugin_register_with_registrar(
10921092
plugin->window_geometry.min_height = -1;
10931093
plugin->window_geometry.max_width = G_MAXINT;
10941094
plugin->window_geometry.max_height = G_MAXINT;
1095+
plugin->window_hints = static_cast<GdkWindowHints>(0);
10951096

10961097
// Disconnect all delete-event handlers first in flutter 3.10.1, which causes delete_event not working.
10971098
// Issues from flutter/engine: https://github.com/flutter/engine/pull/40033

0 commit comments

Comments
 (0)