This patch only sets minimum tracking width/height when both ptMinTrackSize.x and ptMinTrackSize.y are non-zero value. And it didn't handle ptMaxTrackSize's case. Windows has a more complex behaviour which allows application to set minimum/maximum tracking width or height individually, but this patch already made some applications happier.
Signed-off-by: Jactry Zeng jzeng@codeweavers.com --- dlls/winex11.drv/window.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 4676b09935..41a8fa52b8 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -694,6 +694,19 @@ static void set_size_hints( struct x11drv_win_data *data, DWORD style ) size_hints->min_height = size_hints->max_height; size_hints->flags |= PMinSize | PMaxSize; } + else + { + MINMAXINFO minmax; + + memset( &minmax, 0, sizeof(minmax) ); + SendMessageW( data->hwnd, WM_GETMINMAXINFO, 0, (LPARAM)&minmax ); + if (minmax.ptMinTrackSize.x && minmax.ptMinTrackSize.y) + { + size_hints->min_width = minmax.ptMinTrackSize.x; + size_hints->min_height = minmax.ptMinTrackSize.y; + size_hints->flags |= PMinSize; + } + } } XSetWMNormalHints( data->display, data->whole_window, size_hints ); XFree( size_hints );