When the listbox receives a WM_WINDOWPOSCHANGED message and calls DefWindowProc on it, which then ends up sending a WM_SIZE to the window, some applications swallow that up and won't pass the WM_SIZE to the listbox. However, they do pass a LB_SETCOLUMNWIDTH, even when the column width did not change at all. So we have to unconditionally update the size itself (not just the page) when we receive that message.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22440 Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/comctl32/listbox.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index b3491bb..b3719a6 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1260,10 +1260,12 @@ static LRESULT LISTBOX_SetHorizontalExtent( LB_DESCR *descr, INT extent ) */ static LRESULT LISTBOX_SetColumnWidth( LB_DESCR *descr, INT width) { - if (width == descr->column_width) return LB_OKAY; - TRACE("[%p]: new column width = %d\n", descr->self, width ); + /* update the SIZE unconditionally, because some applications swallow + WM_SIZE from DefWindowProc and only send LB_SETCOLUMNWIDTH, even + when the column width doesn't even change (but its size does) */ + TRACE("[%p]: new column width = %d\n", descr->self, width); descr->column_width = width; - LISTBOX_UpdatePage( descr ); + LISTBOX_UpdateSize(descr); return LB_OKAY; }