In wxMSW, single line read-only wxTextCtrl doesn't accept focus from
keyboard, so keyboard and screen reader users can't Tab to it and read
its contents.
Add wxWindow::EnableFocusFromKeyboard(), the counterpart of the existing
DisableFocusFromKeyboard(), to let the application allow this.
Update the documentation and add a wxMSW-only unit test.
Fixes#10760.
Closes#27054.
Clarify that wxToolTip::Enable() only affects tooltips set with
wxWindow::SetToolTip() under wxMSW, is not implemented in wxOSX or
wxQt, and is ineffective with GTK 3.10 and later.
Closes#27029.
When determining the size of a window, GetScrollbarSize() should be used
instead of using the metrics values because the function takes into
account the case of overlay scrollbars, which are used by default with
GTK 3, unlike the metric value.
Also update the documentation to recommend doing this.
Iterate over the animation manually to find the frame we need.
Update the sample to allow showing individual animation frames.
Closes#27009.
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
Add support at wxPersistentWindow level for saving the DPI at which the
window coordinates were saved to allow rescaling the values by the ratio
of this DPI to the current one if the DPI has changed between saving and
restoring.
This allows keeping the same proportional size of the window after DPI
change on the platforms not using DPI-independent pixels (such as wxMSW)
too by just using the new {Save,Restore}Coord() functions instead of
{Save,Restore}Value() for any quantities that need to be scaled.
Do this for wxPersistentTLW to update the window size to remain
proportionally the same after DPI change.
The danger of losing data seems to outweigh any performance
considerations here, so do call fsync() before renaming the file to
ensure that the data is really on disk before overwriting the original
file.
See #25088.
The existing Flush() only called fflush() but this is not enough to
really flush the file to the disk.
We can't start calling fsync() from Flush() as this may significantly
slow down the existing code. We could add a separate Sync() but as it
almost always makes sense to flush the file before syncing it, add a new
function doing both at once instead.
Don't claim that it supports "renaming" to a directory because it does
not and never did, under any platform.
Also document the parameters to repeat that "newpath" must be a file.
Use MoveFileEx() as just about everybody else (Boost, Python etc) does
because this is the closest equivalent to POSIX rename().
This is a behaviour change compared to earlier 3.3.x series as
ReplaceFile() used until now (see #25089) preserved file attributes but
now we don't do it any longer -- but we provided CopyAttributesFrom()
which can be used in the application if it needs it.
Closes#26713.
Copy the target attributes that are easy to copy and make sense to
preserve under Windows too instead of only doing it under Unix in
wxTemp{F,}File and do it in a new wxFileName::CopyAttributesFrom()
function instead of duplicating the same code in both classes.
The new function can be potentially useful on its own, so make it public
and document it.
Add a unit test verifying that the attributes are preserved after
overwriting the file with wxTemp{F,}File.
Show "key tips", i.e. popup windows showing the key that can be used to
activate a ribbon element, and add support for using keys to do it to
improve accessibility.
Closes#26935.
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.
This function is trivial but it's still better to have it than to
duplicate it in several different places.
No real changes, this is just a refactoring.
It does work in wxGTK3 and wxOSX now using wxOverlay, see fafc714057
(Use wxOverlay to show sash feedback in non-live resize mode in wxAUI,
2024-01-25).
See #26960.
Extra controls (including the file type filter choice) have been disabled
in sandboxed applications since the 2013-era workaround for #14906: the
native save/open panel runs out of process (Powerbox/NSRemoteView) and
inserting our views into its view hierarchy crashed.
The supported contract is to build the accessory view entirely in-process
and hand the finished NSView to -[NSSavePanel setAccessoryView:]; the
panel then hosts it safely even when remote. Do exactly that: create the
extra control and the filter panel as children of a hidden in-process
host window instead of parenting them to the (possibly remote) panel.
This makes extra controls and file type filters work in sandboxed
applications too. As a safety valve, a system option, which can be set
by the user by setting wx_osx_openfiledialog_disable_extra_controls
environment variable to 1, is provided to restore the old behaviour of
simply ignoring the extra controls.
Closes#26908.
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.
Use libayatana-appindicator3 (if available) to implement wxTaskBarIcon
using the StatusNotifierItem protocol, which is required for system tray
functionality on Wayland.
To be able to use the specified icon with AppIndicator, we save it to a
temporary file so that it would be accessible to StatusNotifierWatcher
which actually shows it.
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
MSW cross-builds / wxMSW 64 bits not compatible (push) Canceled after 0s
MSW cross-builds / wxMSW/Univ (push) Canceled after 0s
MSW cross-builds / wxMSW 32 bits (push) Canceled after 0s
Code Checks / Check Spelling (push) Canceled after 0s
Code Checks / Check Whitespace (push) Canceled after 0s
Code Checks / Check Mixed EOL (push) Canceled after 0s
Code Checks / Check C++ Style (push) Canceled after 0s
Code Checks / Check All Headers In allheaders.h (push) Canceled after 0s
Update Documentation / Update Online Documentation (push) Canceled after 0s
GDI Rectangle() draws no pixels for an outlined rectangle with a
physical size of 1x1. Detect this case in
wxMSWDCImpl::DoDrawRectangle() and draw the single device pixel
using the current pen colour, matching DrawPoint() for this
degenerate rectangle.
Keep the documentation and drawing sample focused on the remaining
native GDI limitation for other tiny outlined rectangles.
Fixes#3096.
Closes#26857.
This function seems to have never existed in wxPanel and was removed
from its base wxWindow class in 74ea434841 (Add a function to perform
internal processing of wxSysColourChangedEvent, 2026-07-28).
Closes#26791.
When Wayland session management protocol is available, use it to save
and restore the ID of the session used to save the window geometry by
the compositor.
This relies on a new, so far private, SetWaylandXDGSessionId() function
in wxTopLevelWindow, which can be used to indicate that the TLW should
be part of the application session and so its geometry should be saved
by the compositor.
wxPersistentTLW has been modified to call this function when used on a
system with XDG session management protocol support which, in turn,
required adding SaveString() and RestoreString() to GeometryStore.
Add missing semicolons which resulted in 2 declarations being merged
into a single one in the generated HTML.
Fix user-defined operator declaration syntax.
Fixes#26754.
Closes#26764.
Update the MSW-related parts after d7d94f9 (Support explicit
switching both to and from dark mode in wxMSW, 2026-07-24).
Closes#26739.
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
It was int because the initial plan was to add other flags that could be
combined with the existing ones, but now that there are 3 possible
values combining the elements of this enum doesn't really make sense any
more.