Select an item initially to prevent GTK from doing it automatically as soon as
the listbox is clicked anywhere (even outside of the items area).
This makes all GUI tests finally pass under wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65938
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
m_list->Append(testitems);
+ // It is important to set a valid selection: if the control doesn't have
+ // any, clicking anywhere in it, even outside of any item, selects the
+ // first item in the control under GTK resulting in a selection changed
+ // event. This is not a wx bug, just the native platform behaviour so
+ // simply avoid it by starting with a valid selection.
+ m_list->SetSelection(0);
+
m_list->Update();
m_list->Refresh();