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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Clarify that wxStaticText::Wrap() operates on the plain text label and
strips formatting previously set with wxControl::SetLabelMarkup().
See #13389.
Closes#27131.
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.
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.
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>
wxAuiNotebook's wxAuiManager is only an implementation detail used for
its tab frames, plus the hidden dummy pane created during initialization.
Reject attempts to add arbitrary windows to it instead of making notebook
code tolerate such panes.
Update the AUI test to cover the narrower contract by checking that an
external non-tab pane is rejected and not registered with the manager.
Fixes#4771.
Closes#26902.
Since the changes of f11053a2d3 (Fix copy/paste in wxGTK when a
clipboard manager is running, 2026-03-09) we were accumulating all
data passed to wxClipboard::AddData() because we never cleared the list
of targets in the active selection any more.
This resulted in a crash under WSL (probably due to overflowing some
implementation limits) and must have been problematic elsewhere too, so
stop doing this and do clear the list of targets before setting new
ones.
Still don't call wxClipboard::Clear() neither from AddData() nor from
SetData() to avoid reintroducing the original problem fixed by the
commit above.
See #26265, #26278.
Closes#27102.
Co-authored-by: Eran Ifrah <eran@codelite.org>
Discovered by an LLM as the result of "a targeted scan for common
misspellings, duplicated words, and nearby wording errors".
Reviewed and confirmed by a human.
Closes#27122.
Wrap the definition of wxOSX_USE_NSCELL_RENDERER with #ifndef so that
this macro can be defined 0 as a compiler option, rather than requiring
the source file to be modified.
See #27101.
Closes#27118.
Refactor pasteboard code for reuse in dnd.
Improve setting flags for file objects.
See #27047.
Closes#27117.
Co-authored-by: Stefan Csomor <csomor@advancedconcepts.ch>
Use the native tab-aware text output path for MSW wxDC text containing
tab characters, so DrawText() and DrawLabel() render tab spacing instead
of missing-glyph boxes.
Add focused drawing coverage for leading tab characters.
Fixes#11563.
Closes#27087.
Retry the clipboard operation if the clipboard happens to be busy
(because another application or the system is using it) just at the time
when we need it.
This should avoid spurious errors in CMake MSW CI jobs which are
probably due to the fact that multiple tests using clipboard may be
running in parallel now, but also seems to be useful for the real
applications which might run into the same problem, so fix it at the
library level rather than in the test.
This amends the recent 49d8a0c6f8 (Make ListCtrl::ColumnDrag unit test
more robust, 2026-09-28) to wait for just the last event as this is all
we need for the test and we don't really need to wait for each event.
Repaint wxHtmlWindow on focus changes and draw a native focus rectangle
around the visible client area when the window has keyboard focus.
This gives keyboard users a visible focus cue without changing HTML layout,
selection, or link handling.
Fixes#11278.
Closes#27086.
On Windows, wxExpandEnvVars() used the same identifier scan for %var% as
for $var, so %ProgramFiles(x86)% stopped at the opening parenthesis and
could expand the wrong variable.
Scan percent-delimited variable names up to the closing percent sign while
leaving the non-percent syntax unchanged. Add a regression test covering
both forms.
Fixes#11262.
Closes#27085.
This is the case for console applications and it was broken by binding
to GetWindowSubclass() import of comctl32.dll by name because it's not
present in v5 of the DLL which is used in absence of the manifest,
resulting in the executable being unable to start.
Apply a local fix to this by loading this function during run-time, when
we can be sure that we're using v6 which does export it by name (v5 only
exports it by ordinal 411).
Closes#27114.
Extract code duplicated in wxWidgetCocoaImpl::SetAccessibilityLabel()
and SetAccessibilityTitleElement() into a new function.
No real changes.
See #27056, #27060.
Under MSW, screen readers use the label preceding a control without its
own label, such as wxChoice or wxTextCtrl, as its name, so dialogs are
accessible without doing anything special. Under macOS this didn't
happen, and VoiceOver only read the labels as separate texts, so users
tabbing through a dialog didn't hear what the controls were for.
Now, when a native control without its own label is created right after
a wxStaticText, the label is set as its accessibility title element,
which VoiceOver reads as the name of the control. Notice that for most
controls the accessibility element is the cell and not the view itself,
so this uses NSAccessibilityUnignoredDescendant() to link the elements
actually used by VoiceOver, and uses the document view for the controls
inside a scroll view.
Closes#27060.
The new function allows to set the name used by screen readers for any
window, e.g. for buttons showing only a bitmap or text controls without
a label before them.
Implement it for wxMSW and wxOSX and add documentation and a MSW-only
unit test.
Closes#27056.
In dark mode wxListCtrl draws its items itself and decides whether an
item is hot from the mouse position at the time it is painted. But when
the control scrolls, the native control moves the rows that are already
drawn instead of repainting them, and doesn't invalidate anything for
the hot item if the mouse didn't move.
Scrolling with the keyboard while the mouse is over the control
therefore leaves a trail: the row drawn as hot keeps its highlight at
its new position, and the row that is now under the mouse is drawn as
hot too, so every row that passes under the mouse stays highlighted.
Refresh the control when a message that can scroll it did change the
top item.
Closes#27112.
Signed-off-by: Oleg Tolmatcev <oleg.tolmatcev@gmail.com>
Don't show the message every time CMake is configured, but only the first time
(or when the library has changed).
Also change the message format to be similar to other find_package results.
See #27062
Handle double-clicks on wxAuiFloatingFrame by docking the pane back to
its saved dock position when the pane is still dockable. On MSW, handle
the native caption double-click message so the outer title bar redocks
instead of falling through to frame default handling.
Add coverage for the MSW non-client title-bar path and the resulting
manager state transition.
Fixes#10004.
Closes#27083.
Using wxBitmapBundle means SVG files can now be used, multi-resolution
bitmap bundles can be used, scaling for high DPI now uses scaling code
for bitmap bundles which generally provides better scaling results.
Also add support for loading SVG images from wxInputStream and use to
implement support for compressed .svgz files.
Closes#26474.
The menu approach is okay for a few files, but if you want to tests like
the W3C SVG HTML tests, the hundreds of files can be a pain to step
forward/backward using a menu only.
See #26474.
wxBUILD_DEBUG_LEVEL has a value "Default" option that actually is the
real default.
CMake 3.10 is required now, don't mention supporting 3.5.
Closes#27111.