GNOME Bugzilla – Bug 711110
GDK_HINT_MAX_SIZE ignored on Win32
Last modified: 2013-10-31 21:01:04 UTC
gtk version: 2.24.21 Setting a maximum window size via gtk_window_set_geometry_hints() does not work on Windows. The problem appears to be in the gdk_event_translate() WM_GETMINMAXINFO handler. It properly checks for the GDK_HINT_MAX_SIZE hint flag and sets mmi->ptMaxTrackSize, but then clobbers it with a hardcoded value of (30000, 30000). This behavior was introduced by commit 4f9e1dd4, whose log message claims to be changing the *default* maximum size, but in fact it's overriding the maximum size in all cases. It appears that the gdk_event_translate() implementation in Git master behaves the same way, though I haven't tested it.
Created attachment 258687 [details] [review] Fix by moving the default values into an else block.
Fixed in master 46fbefe79504f288d89d376940e3ae514b233951
Cherry-picked over to gtk-2-24 branch 280fc402be5fb46b66bcd32056963bb1afb8b54b