Skip to content

Commit

Permalink
Initialize window_hints to fix minimum size setting in release mode (#…
Browse files Browse the repository at this point in the history
…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).
  • Loading branch information
viseztrance authored Nov 22, 2024
1 parent a911310 commit 3678a0a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/window_manager/linux/window_manager_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,7 @@ void window_manager_plugin_register_with_registrar(
plugin->window_geometry.min_height = -1;
plugin->window_geometry.max_width = G_MAXINT;
plugin->window_geometry.max_height = G_MAXINT;
plugin->window_hints = static_cast<GdkWindowHints>(0);

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

0 comments on commit 3678a0a

Please sign in to comment.