From: Gabriel Ivăncescu Subject: [PATCH v5 2/9] comctl32/listbox: Repaint the old selected item after setting the item selection Message-Id: <6a64fed27ae52bf4af4ccc74ee1ae38e5eb3c5e3.1550068339.git.gabrielopcode@gmail.com> Date: Wed, 13 Feb 2019 16:36:13 +0200 In-Reply-To: <11333f7ce22359311af049afdfeb56e71fc1a611.1550068339.git.gabrielopcode@gmail.com> References: <11333f7ce22359311af049afdfeb56e71fc1a611.1550068339.git.gabrielopcode@gmail.com> Signed-off-by: Gabriel Ivăncescu --- Single-selection listboxes will rely on this after the next patch to get correct state when painting. This has been split. dlls/comctl32/listbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index db7d474..6ab224e 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1466,8 +1466,8 @@ static LRESULT LISTBOX_SetSelection( LB_DESCR *descr, INT index, if (index == oldsel) return LB_OKAY; if (oldsel != -1) descr->items[oldsel].selected = FALSE; if (index != -1) descr->items[index].selected = TRUE; - if (oldsel != -1) LISTBOX_RepaintItem( descr, oldsel, ODA_SELECT ); descr->selected_item = index; + if (oldsel != -1) LISTBOX_RepaintItem( descr, oldsel, ODA_SELECT ); if (index != -1) LISTBOX_RepaintItem( descr, index, ODA_SELECT ); if (send_notify && descr->nb_items) SEND_NOTIFICATION( descr, (index != -1) ? LBN_SELCHANGE : LBN_SELCANCEL ); -- 2.20.1