=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: user32/listbox: Repaint the old selected item after setting the item selection.

Alexandre Julliard julliard at winehq.org
Fri Feb 15 14:37:01 CST 2019


Module: wine
Branch: master
Commit: 087304f117de46d41fd995bad787a8876a3cb324
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=087304f117de46d41fd995bad787a8876a3cb324

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Thu Feb 14 14:06:41 2019 +0200

user32/listbox: Repaint the old selected item after setting the item selection.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 );




More information about the wine-cvs mailing list