81055 Commits
Author SHA1 Message Date
Vadim Zeitlin fb2e182b34 Merge branch 'listctrl-check-events'
Make events sent by wxListCtrl::CheckItem() consistent across all
platforms.

See #27154.
2026-10-04 19:30:26 +02:00
Vadim Zeitlin a668d59af1 Merge branch 'ci-drop-macos-14'
Switch CI jobs using macOS 14 to 15 and fix new warnings when using
newer Apple clang used on this GitHub Actions image.

See #27153.
2026-10-04 19:29:06 +02:00
Vadim Zeitlin 4f9ff04ccc Generalize wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE to clang too
Apple clang now enables the warning suppressed by this macro by default,
so it becomes important to suppress it for this compiler as well and not
just gcc.

Rename the macro to remove "GCC" prefix which doesn't make sense any
more now that this macro is not only for gcc.

This avoids warnings in the test suite when building in macOS 15 GitHub
Actions image using newer Apple clang.
2026-10-04 19:26:41 +02:00
Vadim Zeitlin add0932f23 Optimize wxMSW wxChoice/wxListBox::SetString() if nothing changes
Because the corresponding native controls don't support modifying their
items in place, wxChoice and wxListBox had to remove the item and add it
back, which was quite expensive, so it's better to avoid this if the
item doesn't change at all.
2026-10-04 18:08:29 +02:00
Vadim Zeitlin 6dc021c270 Restore and improve the fix for Window::Refresh test under Mac
The original fix applied in 95a47a88a9 (Make Window::Refresh test more
robust under Mac, 2026-07-23) was unfortunately lost when 8003fd68a4
(Fix Window::Refresh unit test under wxGTK now, 2026-07-24) was applied
soon after. And this fix wasn't sufficiently robust anyhow as a single
wxYield() might not have been enough.

Really wait for the initial repaint of both the parent and all children
before running this test to hopefully avoid problems in this test in the
future under all platforms.

See #26726.
2026-10-04 17:35:44 +02:00
Maarten Bent 4725aa3a22 Update libpng submodule to v1.6.59
Closes #27152.
2026-10-04 17:11:44 +02:00
Vadim Zeitlin 7024b7dced Merge branch 'fix-enterleave-test' of github.com:AliKet/wxWidgets
Fix testing wxEVT_{ENTER,LEAVE}_WINDOW.

See #27138.
2026-10-04 17:04:18 +02:00
Quin Gillespie 278397fcf6 Fix encoding U+FFFF as UTF-8
U+FFFF was encoded using 4 bytes instead of 3 in wxUniChar::AsUTF8(),
used by wxString in UTF-8 build, producing an invalid overlong sequence.

wxUString::utf8_str() had the same bug, but there it also wrote one byte
past the end of the buffer, as the length of the result was computed
correctly, i.e. using 3 bytes for this character, before encoding it.

Fix both comparisons and add a unit test checking the encoding of the
code points around the end of the BMP.

Fixes #25308.

Closes #27150.
2026-10-04 16:53:52 +02:00
Vadim Zeitlin af203498f5 Fix signature of functions used as CFRunLoopObserverCallBack
These functions must take "activity" parameter as "unsigned long" and
not "int" to make their type compatible with CFRunLoopObserverCallBack
which uses CFRunLoopActivity that is defined as "unsigned long".

This fixes warnings with Apple clang 17, used in GitHub Actions macOS 15
images, which apparently enables -Wcast-function-type-mismatch by
default. And it's the right thing to do, anyhow.
2026-10-04 16:48:35 +02:00
ali kettab b1db90b7b1 Make sure the mouse is outside the window before starting the enterleave test
Also skip running the automatic test that start to fail under MSW/wxQt and Wine.
2026-10-04 14:56:34 +01:00
Vadim Zeitlin e73ae279ed Fix off by 1 error in wxQt wxListCtrl item range checks
Item index must be strictly less than the number of rows, not equal.
2026-10-04 15:41:23 +02:00
Vadim Zeitlin 107ff30b47 Make wxListCtrl::CheckItem() event generation consistent
Previously, wxMSW native version only sent wxEVT_LIST_ITEM_[UN]CHECKED
if the item state has really changed, while the generic version, used in
wxGTK and wxOSX, did it unconditionally and wxQt native version never
did it at all.

Make all ports behave as wxMSW, which seems like the most useful
behaviour and add a unit test checking that this behaves as expected.

Note that virtual controls still always send the events in all ports, as
they work as notifications for the model in their case, and a new test
checks that this is the case in all ports (except wxQt which doesn't
support them).
2026-10-04 15:41:02 +02:00
Vadim Zeitlin e854a2e0dc Switch macOS 14 CI jobs to macOS 15
macOS 14 runners will be retired by GitHub soon.
2026-10-04 15:01:57 +02:00
Vadim Zeitlin 19135e81ed Merge branch 'docs-msw-hicon-ids' of github.com:trypsynth/wxWidgets
Minor wxMSW-specific documentation improvements.

See #27151.
2026-10-04 14:40:19 +02:00
Ryan Lucia e998defe63 Add inline IME support to wxStyledTextCtrl
Implement native pre-edit handling for wxGTK and Cocoa using Scintilla's
tentative input support.

Use a private text input client bridge to complete Cocoa
NSTextInputClient and support GTK pre-edit callbacks without changing
the public API or existing class ABI.

Inline composition is now the default on GTK and Cocoa, existing code
may call SetIMEInteraction(wxSTC_IME_WINDOWED) to retain the previous
behaviour.

While composition is active under wxGTK, the IM context is given first
access to key events, as keys such as Enter and Backspace confirm or
edit the pre-edit text and must not be handled as normal key events.

Rolling the pre-edit text back relies on tentative undo actions being
recorded, so windowed interaction is used while undo collection is
disabled.

Document platform defaults and add regression tests for composition,
UTF-16 ranges, replacement ranges, virtual space, undo, and mode
switching.

Closes #26228.

Closes #26757.
2026-10-04 14:35:59 +02:00
Quin Gillespie ffcf5ef181 Document that window IDs must not be greater than 32767 in wxMSW
Windows stores the IDs as 16-bit values, so greater IDs become negative
and can clash with the automatically assigned ones.

Closes #17329.
2026-10-03 19:26:02 -06:00
Quin Gillespie 839735b1f9 Document wxIcon::GetHICON()
This wxMSW-specific method was public but not documented.

Closes #17221.
2026-10-03 19:26:02 -06:00
Vadim Zeitlin ccb529eb1f Merge branch 'a11y-statusbar'
Add accessibility support for wxStatusBar and wxListCtrl in wxGTK and
wxOSX.

Fixes #15411.

Fixes #24305.

See #27137.
2026-10-04 03:24:33 +02:00
Vadim Zeitlin 59cf381871 Avoid drawing wxListCtrl items when we need to just measure them
In dark mode we redrew all the items when setting the column width to
"automatic" size which made it very slow compared to light mode.

Just don't do it in this case, as it's completely unnecessary.

This brings the time for autosizing 10 columns with 500 items down from
~9s to ~250ms which is almost the same as in light mode.

Closes #24011.
2026-10-04 03:17:29 +02:00
Vadim Zeitlin 7e2814e079 Merge branch 'msvc-depr-warn-fix'
Various fixes for MSVC deprecation warnings

See #27149.
2026-10-04 02:23:29 +02:00
Vadim Zeitlin b7f3bd9d70 Merge branch 'msw-esc-handling'
Change Esc handling in wxMSW to happen after IME and native controls.

See #27148.
2026-10-04 01:48:45 +02:00
Richard e652254fbe Fix wxDateTime::ParseFormat() with leap-day default
Clamp an inherited default day to the last valid day of the parsed
month/year when ParseFormat() replaces the year or month but not the
day, so a Feb 29 default no longer creates an invalid non-leap date.

Add a regression for parsing a year with a Feb 29 default date.

Fixes #14058.

Closes #27135.
2026-10-04 01:47:45 +02:00
Vadim Zeitlin 82c2eb8aab Avoid MSVC deprecation warnings in wx/xrc/xmlres.h
Suppress them for overridden GetAnimation().
2026-10-04 01:45:40 +02:00
Blake-Madden e4601d8e24 Replace wxCHECK with just a pointer check in ribbon accessibility
Destruction-time queries for controls are expected, so they shouldn't
assert. It is difficult to reproduce the assert, seems to require random
timing with the IME service while closing a ribbon, but using a silent
pointer check will remove the wxCHECK assert that can randomly happen.

Closes #27147.
2026-10-03 20:19:53 +02:00
Vadim Zeitlin 0228825c4f Avoid deprecation warning in GeometrySerializer with older MSVC
When wxDEPRECATED_MSG() uses __declspec(deprecated) internally, and not
the standard [[deprecated]] attribute as it does for newer MSVC
versions, the compiler warns about any mention of the deprecated class
even if it's not being really used, so suppress the unwanted warnings
about it.
2026-10-03 17:31:02 +02:00
Vadim Zeitlin 4fb38f80cb Add wxWARNING_{SUPPRESS,RESTORE}_DEPRECATED() macros
They do what they say for all supported compilers, i.e. currently MSVC,
gcc and clang, and using these macros is simpler and shorter than using
compiler-specific macros for each compiler.
2026-10-03 17:31:02 +02:00
Vadim Zeitlin c964cff825 Add wxMSVC_WARNING_{SUPPRESS,RESTORE} macros and use them
Define similar macros for MSVC as we already had for gcc and clang for
consistency and because they are arguably less ugly than directly using
pragmas in the code.

Use them instead of manually disabling warnings.

No real changes.
2026-10-03 17:31:02 +02:00
Mohmed abdel-fattahandVadim Zeitlin 561e88c607 Improve wxMSW wxStatusBar painting in dark mode
Get rid of black borders around the fields and gaps between them.

Fixes #25521.

Fixes #23621.

Closes #27098.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2026-10-03 15:55:12 +02:00
Vadim Zeitlin de18a6d808 Don't handle Esc specially in wxTextEntry auto-complete code
This is not necessary any longer after the changes of the parent commit.

This is a partial revert of 59bdee5558 (Fix handling of Esc while an
auto-complete drop down is open in wxMSW., 2014-03-08), see #13945.
2026-10-03 14:51:43 +02:00
Vadim Zeitlin 058ce47c60 Handle Esc later in wxMSW to avoid stealing it prematurely
Generating wxEVT_CHAR_HOOK for "Esc" presses from the keyboard hook
resulted in multiple problems with IME (see #11386 and #22473 that were
already worked around as well as still open #27145) or other controls
that need to handle "Esc" themselves (see #9102 and #13945 for which we
added the workarounds and #16059 which is still open too).

Solve all of these issues by postponing wxEVT_CHAR_HOOK generation for
this key until later, when the message is already being processed. This
should avoid all such problems at the price of not generating these
events at all in some scenarios, e.g. when a native control really wants
Esc for itself or when wx is used in a modeless dialog in a plugin DLL
and its event loop is not running.

Hopefully this shouldn't be important in practice but this change should
avoid having any more problems with various IMEs.

Closes #16059.

Closes #27145.
2026-10-03 14:51:43 +02:00
Vadim Zeitlin 2ded9fc1f2 Factor out wxSendCharHookEvent() from wxKeyboardHook()
Extract this function from the keyboard hook to allow its reuse in
upcoming commits.

No real changes yet.

This commit is best viewed ignoring whitespace-only changes.
2026-10-03 14:51:43 +02:00
Vadim Zeitlin 0dd86a53d5 Don't define wxHAS_2CHAR_NEWLINES as 0 in wxTextCtrl unit test
By convention, wxHAS_XXX symbols should be defined or not, unlike
wxUSE_XXX ones that are always defined as either 1 or 0.

Change wxHAS_2CHAR_NEWLINES definition and tests for it to follow this
rule.

No real changes.
2026-10-03 13:23:12 +02:00
Richard 570d639451 Fix wxTextCtrl URL test click target
Compute the actual position of the URL text before clicking it instead
of using a fixed client coordinate. This keeps the test using
wxUIActionSimulator for mouse input while avoiding failures when the
fixed point doesn't land on the link text.

Also use a single wxHAS_TEXT_URL_TEST preprocessor symbol instead of
testing a complicated expression.

Closes #27143.
2026-10-03 13:19:41 +02:00
Vadim Zeitlin 234504141c Don't call virtual GetLabel() from Create() in wxOSX
The recent 07590bec33 (Use preceding label as accessibility title of
controls under macOS, 2026-09-21) started calling GetLabel() from
MacPostControlCreate() which is called before the object was fully
constructed and could (and did) result in crashes due to the use of the
not yet initialized members.

Avoid this by adding a new HasAccessibilityTitle() virtual function of
wxWidgetImpl which is fully constructed by the time this function is
used and also addresses the question of whether the preceding label
should be used as this window accessibility title more precisely.

See #27060, #27140.

Closes #27142.
2026-10-03 13:15:00 +02:00
ali kettab 06c82dd6c4 wxQt: reimplement wxFindWindowAtPoint() using QApplication::widgetAt() 2026-10-02 15:41:59 +01:00
Vadim Zeitlin 67f0790c85 Avoid warning for lzma_stream initialization from clang 20+
This compiler started giving -Wnontrivial-memcall for using memset()
with non-trivially copyable type wxLZMAStream, so avoid it by using
LZMA_STREAM_INIT instead, which is meant to be used exactly for this.
2026-10-01 19:55:01 +02:00
Vadim Zeitlin cbc51e8fd4 Simplify and fix wxMiniFrame documentation
Don't claim contradictory things in consecutive lines.

See #27139.
2026-10-01 16:55:04 +02:00
Richard e320e82ec9 Preserve AUI notebook selection after stale child focus
Use the current focused page when handling wxAuiNotebook child-focus
notifications so a delayed focus event from the previous page does not undo
a programmatic selection change made from an event handler.

Add a regression test covering a stale child-focus event after selection has
already moved to another page.

This commit is best viewed ignoring whitespace-only changes.

Fixes #13639.

Closes #27133.
2026-10-01 16:44:16 +02:00
Vadim Zeitlin 3c29b6f951 Merge branch 'aui-mac-drag-crash'
Fix crash when destroying AUI floating frames under Mac.

See #26264, #27125.
2026-10-01 16:23:54 +02:00
Richard cb2cbef660 Fix grid autowrap row autosizing
Set the autowrap renderer DC font from the cell attribute before measuring
line heights, so small-font cells do not inherit another DC font when rows
are autosized.

Use the full spanned row or column extent when asking renderers for their
autosize measurement, and cover autowrap font and spanned-row sizing.

Fixes #14072.

Closes #27136.
2026-10-01 16:22:59 +02:00
Richard 4ff1b87a82 Dismiss previous rich tooltip before showing another
Track the currently active generic wxRichToolTip popup and dismiss it
through the popup notification path before showing a new one, while
ignoring delayed duplicate dismissals for popups already queued for
destruction.

Add a GUI regression test that shows two rich tooltips in sequence.

Fixes #13954.

Closes #27134.
2026-10-01 16:11:51 +02:00
Richard e690b71577 Document that STC marker line numbers are 0-based
Clarify that wxStyledTextCtrl marker methods use zero-based line
numbers.

Fixes #13581.

Closes #27132.
2026-10-01 16:10:17 +02:00
Richard 58f05eca0c Document wxStaticText Wrap markup behaviour
Clarify that wxStaticText::Wrap() operates on the plain text label and
strips formatting previously set with wxControl::SetLabelMarkup().

See #13389.

Closes #27131.
2026-10-01 16:08:38 +02:00
Richard 4b9f6b2bdd Add wxHTML BASE tag handling
Recognize BASE HREF while parsing wxHTML pages and update the parser file
system base so subsequent relative image and page URLs resolve against it.

Add a parser regression test covering relative image loading and default page
URL opening through the updated base.

Fixes #13125.

Closes #27130.
2026-10-01 16:06:04 +02:00
Richard 7043a8e704 Document wxActiveXEventNativeMSW
Add interface documentation for wxActiveXEventNativeMSW, including the native
IDispatch::Invoke() fields exposed by wxActiveXEvent::GetNativeParameters()
and the lifetime of the returned event parameters.

Fixes #12410.

Closes #27129.
2026-10-01 16:04:34 +02:00
Vadim ZeitlinandQuin Gillespie ed39ebb076 Add accessibility support for wxListCtrl in wxGTK and wxOSX
Only wxMSW uses a native control, recognized by screen readers, but
wxGenericListCtrl was not recognized by them at all.

Extend the private accessibility API added in the previous commit to
support table-like controls too and use in wxGenericListCtrl to let
screen readers know about its contents.

Assisted-by: Claude Opus 5.5
Co-authored-by: Quin Gillespie <trypsynth@gmail.com>
2026-10-01 03:10:57 +02:00
Vadim ZeitlinandQuin Gillespie 29aa2bbd4c Add accessibility support for wxStatusBar in wxGTK and wxOSX
Only wxMSW uses the native wxStatusBar which is recognized by screen
readers, while wxGTK and wxOSX use the generic version which is just a
window and so was not recognized by them as being what it is at all.

Add generic (but private for now) SetAccessibleElements() function
implemented for both of them and use it from wxStatusBarGeneric to let
Orca/VoiceOver know about the status bar fields and, in wxGTK, about its
role.

Assisted-by: Claude Opus 5.5
Co-authored-by: Quin Gillespie <trypsynth@gmail.com>
2026-10-01 03:01:52 +02:00
Quin Gillespie 3167657be6 Handle Cmd-Up and Cmd-Down in the generic wxListCtrl under Mac
These keys should work as Home/End under Mac.

Closes #27096.
2026-10-01 02:06:04 +02:00
Vadim Zeitlin 5c22ec6877 Fix possible crash when destroying AUI floating frames
wxAuiFloatingFrame could receive wxEVT_SIZE during its destruction, even
if it was already hidden, and handling these events crashed due to
dereferencing dangling wxSizerItem pointers.

Fix this by overriding wxAuiFloatingFrame::Destroy() to perform the
necessary cleanup when the frame is about to be destroyed.

Add wxAuiManager::DestroyFloatingFrame() helper which makes the code say
more clearly what it does -- this is not required to fix the bug but
affects the same code, so do it in the same commit.

Also add a unit test confirming that destroying the floating frame in
various ways doesn't crash any longer.

Closes #26264.

Originally-by: alilie <alexandru.ilie@hexagon.com>
2026-09-29 17:22:25 +02:00
Vadim Zeitlin e1eb0f4bc4 Factor out wxAuiFloatingFrame::CleanUp()
Make it possible to reuse this function in the upcoming commit.

No real changes yet.
2026-09-29 17:12:11 +02:00