From 47bc3a8b9667ecb5383d39f042045217fcc47d64 Mon Sep 17 00:00:00 2001 From: ali kettab Date: Thu, 30 Nov 2023 14:24:46 +0100 Subject: [PATCH] Try to fix unit tests systematically failing under AppVeyor Raise the window to ensure that it gets the expected mouse events. See #24082. Closes #24109. --- tests/controls/gridtest.cpp | 2 ++ tests/controls/listctrltest.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/controls/gridtest.cpp b/tests/controls/gridtest.cpp index 82cce352dc..638a82bbe5 100644 --- a/tests/controls/gridtest.cpp +++ b/tests/controls/gridtest.cpp @@ -360,6 +360,8 @@ GridTestCase::GridTestCase() : m_tempGrid(nullptr) m_grid->Refresh(); m_grid->Update(); + wxTheApp->GetTopWindow()->Raise(); + waitForPaint.YieldUntilPainted(); } diff --git a/tests/controls/listctrltest.cpp b/tests/controls/listctrltest.cpp index 95b6165017..8dd0af687b 100644 --- a/tests/controls/listctrltest.cpp +++ b/tests/controls/listctrltest.cpp @@ -81,6 +81,8 @@ void ListCtrlTestCase::setUp() m_list = new wxListCtrl(wxTheApp->GetTopWindow()); m_list->SetWindowStyle(wxLC_REPORT | wxLC_EDIT_LABELS); m_list->SetSize(400, 200); + + wxTheApp->GetTopWindow()->Raise(); } void ListCtrlTestCase::tearDown()