Merge branch 'tlw-activate-event'
Extend activation event unit tests and enable them for wxGTK where they seem to pass too now. See https://github.com/wxWidgets/wxWidgets/pull/1194
This commit is contained in:
@@ -45,20 +45,22 @@ static void TopLevelWindowShowTest(wxTopLevelWindow* tlw)
|
|||||||
CHECK(!tlw->IsActive());
|
CHECK(!tlw->IsActive());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tlw->Show(true);
|
// Note that at least under MSW, ShowWithoutActivating() still generates
|
||||||
|
// wxActivateEvent, so we must only start counting these events after the
|
||||||
|
// end of the tests above.
|
||||||
|
EventCounter countActivate(tlw, wxEVT_ACTIVATE);
|
||||||
|
|
||||||
|
tlw->Show(true);
|
||||||
|
countActivate.WaitEvent();
|
||||||
|
|
||||||
// wxGTK needs many event loop iterations before the TLW becomes active and
|
|
||||||
// this doesn't happen in this test, so avoid checking for it.
|
|
||||||
#ifndef __WXGTK__
|
|
||||||
CHECK(tlw->IsActive());
|
CHECK(tlw->IsActive());
|
||||||
#endif
|
|
||||||
CHECK(tlw->IsShown());
|
CHECK(tlw->IsShown());
|
||||||
|
|
||||||
tlw->Hide();
|
tlw->Hide();
|
||||||
CHECK(!tlw->IsShown());
|
CHECK(!tlw->IsShown());
|
||||||
#ifndef __WXGTK__
|
|
||||||
|
countActivate.WaitEvent();
|
||||||
CHECK(!tlw->IsActive());
|
CHECK(!tlw->IsActive());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("wxTopLevel::Show", "[tlw][show]")
|
TEST_CASE("wxTopLevel::Show", "[tlw][show]")
|
||||||
|
Reference in New Issue
Block a user