From: Gabriel Ivăncescu Subject: [PATCH 2/9] user32/listbox: Repaint the old selected item after setting the item selection Message-Id: <5da64109c169ffd26ec51257b337fa77b4efe58e.1550145143.git.gabrielopcode@gmail.com> Date: Thu, 14 Feb 2019 14:06:41 +0200 In-Reply-To: References: Signed-off-by: Gabriel Ivăncescu --- dlls/user32/listbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index a9195dc..ac301c1 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -1475,8 +1475,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