Don't end the AUI resize action when the new size can't be computed, as
can happen for a perfectly ordinary layout: it's enough to have a
resizable pane followed in its dock by a fixed one. This is the case for
the panes in the bottom row of the "aui" sample itself, after all panes
are shown using the corresponding "Perspectives" menu item.
This fixes a serious user-visible problem as mouse renamed captured
forever and the application was left with the resize cursor and with
keyboard input going to the capturing window.
Add a unit test checking for this problem: without the fix in this
commit, "stillCaptured" remained true in it.
Closes#27025.
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
AppendText() moves the insertion point to the end before writing, which
refreshes the default style from the caret position. If a Begin*() style
is active, this could replace the explicit append style with the style at
the end of the existing text.
Save and restore the active default style when the rich text style stack
is non-empty, and cover appending text under a different text colour.
Fixes#10936.
Closes#27037.
Treat embedded wxRichTextCtrl line-break markers as visual line
separators instead of editable trailing spaces. Keep Shift-Enter at the
start of the next visual line, let caret movement cross the marker
correctly, and retain an empty visual line after a trailing marker.
Add focused wxRichTextCtrl coverage for Shift-Enter movement and
insertion around the embedded line-break marker to the test suite.
Fixes#10150.
Closes#27032.
Let the control continue numbered bullet styles that are not backed by a
named list style when creating the next paragraph. Preserve named list
style validation and keep explicit bullet numbers unchanged.
Fixes#10074.
Closes#27030.
Rich edit can generate more than one wxEVT_TEXT_URL for a simulated mouse
click, as URL events are emitted for mouse messages over the URL. Check that at
least one URL event is received instead of requiring exactly one.
Use Catch assertions for the simulator calls and make the test explicitly create
a multiline control so the Url section can run on its own.
Avoid using simulated Ctrl+V in the multiline max-length checks, as
keyboard delivery can be focus and timing dependent. Set clipboard
contents directly and call Paste() instead, keeping coverage of the
native paste path without depending on synthetic key events.
Also verify that clipboard setup has actually completed before pasting,
and wait for each paste to produce the expected control state. Avoid
using Copy() in the selection paste case, which is testing paste and
max-length handling rather than clipboard copy timing.
This is similar to 443c024e07 (Ignore failures in wxGrid column resizing
test with wxQt5, 2026-08-17) and is done for the same reasons of
expediency.
See #25779.
Previously only wxMSW invalidated the cached best size after changing
the label of a wxRadioBox item, but not the other ports, resulting in
wrong layout not accounting for the possibly increased box size.
Fix this by calling InvalidateBestSize() in wxRadioBox::SetString() in
all ports (except for wxQt, where it doesn't work somehow) and not just
wxMSW.
Add a unit test verifying that this works as expected.
Closes#26981.
Send a synthetic wxEVT_KEY_DOWN to the data view control's main window instead
of using wxUIActionSimulator. This still verifies that the composite control
forwards key events to the wxDataViewCtrl itself, but avoids depending on
focus-sensitive OS key injection.
Treat a resize sash mouse-up at the original mouse-down position as a
click, not as a resize. Same-position motion before any actual drag is
ignored too, so click-only sash actions do not feed the resize rounding
path.
Add an AUI manager regression test covering repeated click-only pane
sash actions in the same dock.
Fixes#4547.
Closes#26901.
This was broken by 48bf1ac (Rewrite event generation and propagation in
wxAuiNotebook, 2025-07-12), see #25634 and #25544.
Restore sending this event for the buttons and do it with the correct
page indexes now, i.e. using the logical page index and not its physical
position.
Also consistently allow the handler of this event to prevent the default
action from taking place if it doesn't call wxEvent::Skip(). This is not
100% backwards-compatible but is consistent and more useful.
Add a unit test checking that this works as expected.
Closes#26801.
Make wxScrollHelper::DoScroll() use ScrollWindow() only for axes whose
physical scrolling is enabled. Disabled axes still update their logical
scroll position and invalidate the target window so it repaints.
Add a regression test covering fully disabled physical scrolling and a
mixed horizontal-enabled, vertical-disabled scroll.
This commit is best viewed ignoring whitespace-only changes.
Fixes#4433.
Closes#26900.
Same issue as ClippingBoxTestCase::wxPaintDC: a sole child window gets
stretched to fill the parent under wxGTK, breaking HitTest() and the
multiline PositionToCoords* tests via a wrongly inflated allocation.
GTK3 with a native Wayland backend doesn't support partial redraws at
all: any invalidation anywhere ends up repainting every window with
its own full bounds, so the check that a non-intersecting child stays
unpainted can never hold there. Skip it in that case, based on the
actual X11-vs-Wayland backend rather than the platform, since e.g. a
plain X11/XWayland session with a compositor does support this.
wxWindow::Update() is an intentional no-op under GTK3 with a native
Wayland backend, so Refresh()+Update() doesn't guarantee the paint has
already happened by the time it returns there. Wait for the actual
paint event using WaitForPaint instead, fixing
EventPropagation::ScrollWindowWith(out)Handler and
Grid::SetTable_ClearAttrCache.
Button::{Click,Disabled}, RadioButton::Click, SpinCtrl::{Arrows,Increment,
SetValueInsideEventHandler,Wrap}, SpinCtrlDouble::{Arrows,Increment,
Wrap}, ValNum::Interactive, wxStyledTextCtrl::{AutoComp,Calltip},
Grid::{CellClick,ReorderedColumnsCellClick,CellSelect} and several
wxTreeCtrl tests used wxUIActionSimulator without checking
EnableUITests() first, unlike every other simulated-input test. This
meant they weren't skipped when UI tests are disabled (e.g. now by
default under a native Wayland GTK3 client) and just failed instead.
Add regression coverage for cursor movement across zero-height rows and
zero-width columns. The grid cursor should skip hidden lines when moving
in either direction and remain on a shown row or column.
See #9586.
Closes#26904.
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.
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.
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.
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.
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.
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
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
Fall back to lower-priority clipboard formats if advertised rich text
data can't actually be read, and only report paste success after data
has been retrieved.
Also avoid deleting the selection from wxRichTextCtrl::Cut() unless it
was successfully copied to the clipboard, and make the CutCopyPaste
test verify clipboard contents before relying on them.
See #18738 and #24120 possibly related to this.
Closes#26865.
This happens regularly and is just annoying, so unless somebody decides
to fix this, ignore the failures with just a warning to allow the test
suite to succeed.
See #25779.
Focus the native edit child when testing wxComboBox Enter handling on MSW,
where wxEVT_TEXT_ENTER is generated from the edit control's character message.
Also split Return simulation into key down/yield/key up so the native message
sequence is observed.
Make the other control tests less dependent on platform-specific details:
check visibility of the actual selected grid endpoint instead of a
DPI-sensitive nearby cell, and allow wxDataViewCtrl to report more than one
key-down event.
Reposition the active cell editor after wxGrid resizes its child
windows, keeping the editor inside the visible grid window and
refreshing the old editor area.
Add a GUI regression test that shrinks the grid while editing and
checks that the editor remains visible in the grid window.
Fixes#2678.
Closes#26724.
Comparison doesn't seem to use locale-specific rules by default there,
so limit the changes of 09c22b080e (Fix listboxtest test failing under
wxQt, 2023-10-08) to Windows and check for the actually observed order
under Unix.
Closes#26759.
All attempts to make it pass reliably failed, the changes of 95a47a88a9
(Make Window::Refresh test more robust under Mac, 2026-07-23) fixed it
in one Mac workflow but somehow not the other.
Just disable it to let the test suite pass again.
See #26726, #26674.
Fix CI test failure which started happening in this test after the
addition of Window::ContextHelpCaptureLost in e04e3260fc (Handle
context-help mouse capture loss, 2026-07-08) because the child window
that was not supposed to be repainted still was, as the entire window
needed a refresh.
Refresh and update it before starting the test to make it pass again
reliably.
See #26726.
The changes of e04e3260fc (Handle context-help mouse capture loss,
2026-07-08) added a window which was never deleted and prevented some
subsequent tests from working (strangely enough, apparently only under
Mac).
Use unique_ptr for it to ensure that it is deleted on scope exit.
See #26674.
End wxContextHelp mode when mouse capture is lost and only release the
mouse if the help window still owns capture after the modal help loop.
Add coverage for the capture-loss path so context help exits without
using another input event.
Fixes#21534.
Closes#26674.
Remember the editor instance used for the shown edit control and use it
for visibility checks, painting, hiding, and saving. This keeps the edit
control lifetime independent of later attribute changes, so replacing a
cell or column editor while editing does not make wxGrid hide or save
through the wrong editor.
Add a regression covering replacement of a column bool editor while its
cell is being edited.
Fixes#21986.
Closes#26670.
Override DoGetValue() in wxMSW wxTextCtrl and not GetValue() itself as
the base class version correctly takes the manually managed hints into
account, unlike the overridden version which only did this for plain
edit controls but not the rich edit ones.
Add a unit test to ensure that this bug remains fixed.
See #26176.