[Git][wxwidgets/wxwidgets][master] 51 commits: Reset tool position state before setting to first and/or last

1 view
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Aug 26, 2026, 9:18:28 AM (yesterday) Aug 26
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • f12a2078
    by Blake-Madden at 2026-08-17T06:44:56-04:00
    Reset tool position state before setting to first and/or last
    
  • 52c9eae4
    by Blake-Madden at 2026-08-17T06:56:23-04:00
    Default initialize members
    
  • f84b9634
    by Blake-Madden at 2026-08-17T07:14:07-04:00
    Avoid div by zero
    
  • 467e612b
    by Blake-Madden at 2026-08-17T07:34:23-04:00
    Document set_colour_scheme parameter of wxRibbonMSWArtProvider
    
    Refer to discussion in https://github.com/wxWidgets/wxWidgets/pull/26644
    
  • 72e88365
    by Blake-Madden at 2026-08-17T07:45:31-04:00
    Avoid virtual call from wxRibbonMSWArtProvider CTOR
    
    See discussion from https://github.com/wxWidgets/wxWidgets/pull/26644
    
  • bc2dfec7
    by Blake-Madden at 2026-08-17T08:03:38-04:00
    Remeasure wxRibbonButtonBar button when wxEVT_UPDATE_UI changes its text
    
    Also, update sample to show this fix (and IMO make more sense in what the demo is showing off).
    
  • 8dbf8529
    by Blake-Madden at 2026-08-17T13:35:10-04:00
    Fix stale small bitmap in wxRibbonButtonBar::SetButtonIcon()
    
    Mirrors what InsertButton() does. Without this, it won't the expected icon in medium size mode.
    
  • 4f0e1e5a
    by Blake-Madden at 2026-08-17T13:41:53-04:00
    Nullify (possible) dangling pointer in gallery clear
    
  • 54a21356
    by Blake-Madden at 2026-08-17T14:22:13-04:00
    Demonstrate removing panels in the ribbon demo
    
    Useful in the demo, and also tests an upcoming fix
    
  • 6ec98d7e
    by Blake-Madden at 2026-08-17T14:33:15-04:00
    Fix use-after-free when deleting a wxRibbonPanel
    
  • da339280
    by Vadim Zeitlin at 2026-08-22T19:08:00+02:00
    Fix client size computation when using overlay scrollbars in wxGTK
    
    Using overlay scrollbars is the default since GTK 3.16, but the existing
    code always returned wrong client size when using them because it still
    subtracted the scrollbar size from the total window size even though
    this must not be done when the overlay scrollbar are used as they
    overlap the client size instead of reducing it, as normal scrollbars.
    
    GTK doesn't seem to have a dedicated function for checking if the
    overlay scrollbars are really used, so combine several checks it is
    doing internally to determine if they are, and don't subtract their size
    from the total area if we establish that this is the case.
    
  • 4ac14f24
    by Vadim Zeitlin at 2026-08-22T20:07:16+02:00
    Test that client size correctly accounts for scrollbars
    
    Check that client size is reduced by the size of the scrollbars if it
    changes at all when scrollbars appear -- because it may not be the case
    when overlay scrollbars are used.
    
    Note that this test wouldn't pass with wxGTK3 without the changes in the
    parent commit.
    
  • b622f3a9
    by Vadim Zeitlin at 2026-08-22T20:16:53+02:00
    Fix best size of wxScrolledWindow when using overlay scrollbars
    
    The size of the scrollbars shouldn't be added to the size required by
    the window contents when overlay scrollbars are used.
    
    This required adding new wxWindow::GetScrollbarSize() function, which
    returns wxSYS_VSCROLL_[XY] by default but is overridden in wxGTK to
    return 0 when overlay scrollbars are used. It should almost certainly be
    overridden in wxOSX too.
    
    Currently the new function is used in wxScrolledWindow only but all the
    existing occurrences of wxSYS_VSCROLL_[XY] should be reviewed to check
    if it shouldn't be used instead of them too.
    
  • cfc029ca
    by Vadim Zeitlin at 2026-08-22T21:49:19+02:00
    Rename wxScrollBar::GetScrollbarSize() in wxUniv
    
    Avoid name conflict with the new wxWindow member function using the same
    name.
    
  • aca15832
    by Vadim Zeitlin at 2026-08-22T23:42:59+02:00
    Add "micro" version parameter to wx_is_at_least_gtk3()
    
    This will allow checking for 3.24.x in the upcoming commit.
    
  • 51a37de4
    by Vadim Zeitlin at 2026-08-22T23:53:12+02:00
    Simplify and improve check for "gtk-overlay-scrolling" property
    
    It's documented as having been added in 3.24.9, so just test for this
    version instead of checking if the property exists.
    
  • afc350ce
    by Vadim Zeitlin at 2026-08-23T19:44:10+02:00
    Make SetInitialSize() return false if it didn't change the size
    
    Allow the caller know if the size was changed or not.
    
    This is not used yet but will be in the upcoming commit.
    
  • 0144ee42
    by Vadim Zeitlin at 2026-08-23T19:46:01+02:00
    Fix broken wxRadioBox layout if it was created with its best size
    
    If SetInitialSize() in wxRadioBox::Create() happened to not change its
    size, its buttons could be never positioned correctly. Add an explicit
    Layout() call in this case to fix this.
    
    This fixes a regression introduced in ce1ee46b0c (Use wxRadioButton in
    MSW wxRadioBox implementation, 2022-12-24).
    
  • 822a063d
    by Vadim Zeitlin at 2026-08-23T20:17:52+02:00
    Skip unnecessary layout in wxPickerBase::Create()
    
    If SetInitialSize() has already resized the control, as it typically
    would, there is no need to call Layout() again.
    
  • fa6a43fc
    by Vadim Zeitlin at 2026-08-24T13:38:23+02:00
    Convert simple non-GUI unit tests to use Catch directly
    
    Get rid of the CppUnit-compatible macros in these tests and use Catch
    TEST_CASE() and CHECK()/REQUIRE() directly instead.
    
    No real changes, except for enabling the previously mistakenly (they
    were clearly meant to be) not run RefUnsignedCharAssignmentOperator and
    RefUnsignedCharParenOperator tests in unichar.cpp. Moreover, one of them
    turned out to be broken and had to be fixed here as it does run now.
    
  • 055cdb81
    by Vadim Zeitlin at 2026-08-24T13:38:23+02:00
    Convert more non-GUI unit tests to use Catch directly
    
    Replace the CppUnit test suite classes with Catch test cases, using
    fixtures for the tests which need them.
    
    No real changes.
    
  • 0dd7ce8a
    by Vadim Zeitlin at 2026-08-24T13:38:23+02:00
    Convert socket, thread, events and interactive tests to Catch
    
    Notably, the socket tests using the event loop now use Catch GENERATE()
    to run them both with and without the active event loop instead of the
    PseudoTest_SetUseEventLoop() hack.
    
    No other changes.
    
  • 8e341be5
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Convert stream unit tests to use Catch directly
    
    Replace the CppUnit test suites with Catch test cases, using
    WX_STREAM_TEST_CASE() to define the test cases running the tests
    inherited from BaseStreamTestCase.
    
    The pseudo tests used to run the same tests with different parameters
    are replaced with Catch GENERATE().
    
    Also make the large file tests actually run: they were previously never
    executed as the suite returned by GetlargeFileSuite() was never used.
    
  • f8276cba
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Convert archive unit tests to use Catch directly
    
    Replace CppUnit::TestCase/TestSuite with our own ArchiveTest base class,
    which is all that was really needed here, and run the tests from a
    single Catch test case per archive format.
    
    Also make the previously unused ZipPipeTestCase reachable, but keep it
    disabled by default as it currently fails.
    
  • f6a84693
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Get rid of the last CppUnit macros in non-GUI tests
    
    Also update the unit tests documentation to reflect that only the GUI
    tests still use the old CppUnit style.
    
  • 3a96d26c
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Fix C++11 build by including wx make_unique.h
    
    std::make_unique() doesn't exist in C++11 which we still support.
    
  • 87ecf894
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Convert simple GUI unit tests to use Catch directly
    
    Get rid of the CppUnit compatibility macros in the GUI test files not
    requiring any special handling: replace the test suite classes with Catch
    fixtures, setUp()/tearDown() with the ctor/dtor and CPPUNIT_ASSERT_XXX()
    with CHECK().
    
    Tests using wxUIActionSimulator don't use WXUISIM_TEST() any more but
    check EnableUITests() at the beginning of the test itself instead.
    
    The pseudo test PseudoTest_Inversed in the wxSlider tests is replaced with
    GENERATE() rerunning the tests for both normal and inversed sliders.
    
    No real changes.
    
    Assisted-by: Claude Opus 5
    
  • 3087ec19
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Convert the remaining GUI unit tests to use Catch directly
    
    Get rid of CPPUNIT_TEST_SUITE() and the other CppUnit compatibility macros
    in all the remaining GUI tests, including the ones sharing their tests via
    a common base class: wxItemContainer, wxTextEntry, wxBookCtrlBase and
    wxPickerBase tests are now defined using the new wxXXX_TESTS() macros
    generating one Catch test case per test instead of being listed inside the
    test suite of the derived class.
    
    Replace WXUISIM_TEST() with a check for EnableUITests() at the beginning of
    the test itself and remove this macro from testprec.h, adding the new
    generic wxTEST_CASE_FOR_METHOD() helper used by all the macros above there.
    
    Get rid of the pseudo tests: wxTextCtrl tests for the multi-line controls
    now use a separate fixture deriving from the single-line one instead of
    PseudoTestSwitchToMultiLineStyle() and the owner-drawn wxListBox tests use
    GENERATE() instead of PseudoTest_OwnerDrawn().
    
    No real changes.
    
    Assisted-by: Claude Opus 5
    
  • ccc264fd
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Convert wxAffineMatrix2D tests to use Catch directly
    
    These tests use several fixtures deriving from each other and running the
    same tests, so define the test cases for all of them using a helper macro.
    
    Also merge setUp() and tearDown() into the fixture ctor and dtor.
    
    No real changes.
    
    Assisted-by: Claude Opus 5
    
  • ac6b47da
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Remove wx/catch_cppunit.h, no longer used by anything
    
    Now that none of the tests use the CppUnit compatibility macros any more,
    this header can be removed entirely.
    
    Move the pieces still needed by the tests, i.e. wxINFO_FMT(),
    WX_ASSERT_MESSAGE(), WX_ASSERT_EQUAL_MESSAGE() and the Catch::StringMaker
    specializations for wxString and wxUniChar[Ref], to tests/testprec.h.
    
    wxGetCurrentTestName() is now implemented using Catch itself instead of the
    strings set by the CppUnit macros, which means that it finally returns the
    correct name for all the tests and not just the CppUnit-style ones.
    
    Assisted-by: Claude Opus 5
    
  • 38c9fde6
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Don't put INFO() and CHECK() on the same line in the tests
    
    This is a leftover from the automatic conversion of the CppUnit assertion
    macros with a message to Catch, using two separate lines is more readable.
    
    No real changes.
    
    Assisted-by: Claude Opus 5
    
  • 0062d986
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Add checks for clipboard state to wxTextCtrl::LongPaste test
    
    Try to give better error message if the test fails because of a problem
    with the clipboard and not with wxTextCtrl itself.
    
  • 46d8f135
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Fix wxHtmlPrintout::Pagination test failing depending on the font DPI
    
    The test used a font with a fixed size in pixels and passed its point size
    to SetStandardFonts() in order to be independent of the DPI, but this only
    works if wxFont uses the same DPI for the pixel to point conversion as the
    one used when rendering the text later, which is not the case under wxGTK,
    where wxFontInfo(wxSize(10, 16)).GetPointSize() returns 9 and not the
    expected 12, resulting in smaller text and hence fewer pages than expected.
    
    Compute the point size corresponding to the desired pixel size ourselves,
    using the PPI of the DC the text is going to be rendered on, and also set
    the printer PPI to the screen one, on all platforms and not just wxGTK3,
    to ensure that the fonts are not scaled when rendering.
    
  • 6992194d
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Check result of wxHtmlPrintout::SetUp() in pagination unit test
    
    It shouldn't fail, but make sure we detect it if it does.
    
  • c1fc91dd
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Make the text used in wxHtmlPrintout::Pagination test more readable
    
    Use raw literal for it and strip all the quotes except the escaped ones
    in the text itself, which now don't need to be escaped any longer.
    
  • 6c81b4cc
    by Vadim Zeitlin at 2026-08-24T18:46:44+02:00
    Update test exclusions in the CI jobs to match the new test names
    
    The changes in this branch have changed the names of many tests, update
    the exclusion lists to use the new names.
    
  • 39ac888e
    by Vadim Zeitlin at 2026-08-24T19:56:07+02:00
    Replace raw pointers in tests fixtures with std::unique_ptr<>
    
    Now that we have fixtures, with ctors and dtors, instead of setUp() and
    tearDown(), we can use std::unique_ptr<> instead of manual memory
    management.
    
    No real changes.
    
  • f1810bb9
    by Vadim Zeitlin at 2026-08-24T19:56:07+02:00
    Fix compilation of stream position checks with MSVC
    
    CHECK(pubseekoff(...) == int) failed to compile because of an ambiguity
    due to multiple overloaded operator==()s in MSVC CRT.
    
    Add a global operator==() overload matching the actual types to help
    this compiler to do the right thing.
    
    This should be reverted when support for MSVS 2015 is dropped.
    
  • 9bff69ab
    by Richard at 2026-08-26T14:28:01+02:00
    Fix wxGrid::MakeCellVisible() with variable row heights
    
    Use the current unscrolled origin and the actual target-cell bottom when
    scrolling down, instead of rebuilding a position from preceding row
    heights. Add a grid regression test with mixed row heights.
    
    Fixes #4371.
    
    Closes #26897.
    
  • 6ee3aafd
    by Richard at 2026-08-26T14:28:01+02:00
    Make wxDateTime::GetAsDOS() work for dates after 2038
    
    Compute the DOS date/time fields from wxDateTime::GetTm() instead of
    round-tripping through time_t. This lets representable DOS dates beyond
    the 32-bit time_t range, including 2079-04-08, pack correctly while
    still rejecting years outside the DOS 1980..2107 range.
    
    Add focused datetime coverage for the DOS minimum, the reported 2079
    date, and the DOS maximum.
    
    Fixes #4393.
    
    Closes #26898.
    
  • 156e6ed1
    by Vadim Zeitlin at 2026-08-26T14:28:01+02:00
    Merge branch 'RibbonFixes2' of github.com:Blake-Madden/wxWidgets
    
    Miscellaneous fixes and improvements to wxRibbon and its sample.
    
    See #26870.
    
  • daa672ca
    by Scott Talbert at 2026-08-26T14:28:01+02:00
    Fix crash in wxWebView Edge backend due to dangling callbacks
    
    The creation of wxWebView instances with the Edge backend involves async
    callbacks.  If a WebView instance is created and then destroyed before
    the callback completes, the callback is left with a dangling pointer.
    Fix this by using a std::shared_ptr<bool> to indicate whether the
    instance is still alive.  If it is not, abort the callback instead of
    crashing.
    
    Fixes #26491.
    
    Closes #26871.
    
    Co-authored-by: Vadim Zeitlin <va...@wxwidgets.org>
    
  • 4ca43f34
    by Vadim Zeitlin at 2026-08-26T14:28:01+02:00
    Merge branch 'gtk-overlay-sb-client-size'
    
    Fix client size computation in wxGTK when using overlay scrollbars.
    
    See #26889.
    
  • 1b509e1b
    by Vadim Zeitlin at 2026-08-26T14:28:01+02:00
    Merge branch 'msw-fix-initial-radiobox-layout'
    
    Fix initial layout for radiobox using fixed size in wxMSW.
    
    See #26893.
    
  • a9f99b49
    by Richard at 2026-08-26T14:28:01+02:00
    Respect specified best size when adding wxAUI panes
    
    Seed the initial dock size from an explicit wxAuiPaneInfo::BestSize()
    when no saved dock size is present. This lets AddPane() honor requested
    left/right or top/bottom pane sizes without making callers use MinSize()
    as a workaround, while preserved dock sizes from restored layouts still
    take precedence.
    
    Add AUI manager tests for explicit BestSize() and saved dock_size
    precedence.
    
    Fixes #4404.
    
    Closes #26899.
    
  • bce3f8c8
    by Scott Talbert at 2026-08-26T14:29:33+02:00
    Check for wayland-protocols before using it in configure
    
    wx_cv_wayland_protocols_dir could be empty if the wayland-protocols
    package wasn't installed, but wxHAVE_WAYLAND_SESSION_MANAGEMENT was
    still being defined unconditionally in this case, resulting in
    wayland.cpp trying to include the never-generated
    xdg-shell-client-protocol.c and failing to compile.
    
    Only define wxHAVE_WAYLAND_SESSION_MANAGEMENT if xdg-shell.xml is
    actually found under the wayland-protocols data directory, falling
    back to disabling session management support otherwise, just as is
    already done when GTK is too old to support it.
    
    Closes #26926.
    
  • d91a6514
    by Vadim Zeitlin at 2026-08-26T14:29:59+02:00
    Merge branch 'drop-cppunit'
    
    Get rid of the remains of CppUnit support, replace all use of
    compatibility macros with direct use of Catch.
    
    See #26873.
    
  • ef396863
    by Richard at 2026-08-26T14:42:07+02:00
    Test split wxAuiNotebook tab event selections
    
    Add regression coverage for split wxAuiNotebook tab events. Verify that
    middle and right tab events report the notebook page index instead of the
    local tab-control index.
    
    See #9869.
    
    Closes #26906.
    
  • 1a552474
    by Richard at 2026-08-26T14:52:04+02:00
    Emit AUI page-changed event after removing last page
    
    Send wxEVT_AUINOTEBOOK_PAGE_CHANGED when DeletePage() or RemovePage()
    removes the selected last wxAuiNotebook page and changes the selection
    to wxNOT_FOUND. Add coverage for both removal paths and keep
    programmatic removal from emitting page-close events.
    
    Fixes #9920.
    
    Closes #26907.
    
  • 90fcb360
    by Javid Khan at 2026-08-26T14:56:16+02:00
    Fix use-after-free with duplicate names in archive wxFileSystem
    
    Don't remove wxArchiveEntry if another entry with the same name is
    encountered, still keep it in the list of all entries so it can continue
    to be used.
    
    This needed changing the ownership rules in wxArchiveFS code: now the
    entries are owned by the list and not by the hash table as before, hash
    table now stores non-owning pointers only.
    
    Closes #26927.
    
  • bdd6d528
    by Vadim Zeitlin at 2026-08-26T14:58:55+02:00
    Replace "new T" with "make_unique<T>" in wxFileSystem unit test
    
    No real changes, just use make_unique<> for consistency.
    

163 changed files:

The diff was not included because it is too large.
Reply all
Reply to author
Forward
0 new messages