From 3678a0acdc1eda5f28dce647f96e6cf7b0e799e6 Mon Sep 17 00:00:00 2001 From: Daniel Mircea Date: Fri, 22 Nov 2024 17:31:50 +0200 Subject: [PATCH] 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). --- packages/window_manager/linux/window_manager_plugin.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/window_manager/linux/window_manager_plugin.cc b/packages/window_manager/linux/window_manager_plugin.cc index b1839577..7093ca49 100644 --- a/packages/window_manager/linux/window_manager_plugin.cc +++ b/packages/window_manager/linux/window_manager_plugin.cc @@ -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(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