Commit Graph
5661 Commits
Author SHA1 Message Date
Vadim Zeitlin 3f60ae43c0 Document that MDI windows don't appear correctly in dark mode
Not only they don't have the expected dark appearance, but the child MDI
frame buttons don't appear at all, making them unusable.

See #27077.
2026-09-24 23:52:15 +02:00
Quin Gillespie f91f5ae270 Allow giving focus to read-only wxTextCtrl from keyboard in wxMSW
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.
2026-09-22 23:07:25 +02:00
Vadim Zeitlin a16da69037 Merge branch 'generic-treectrl-getbestclientwidth'
Fix best size computation in wxGenericTreeCtrl and several bugs
discovered while working on this.

See #27043.
2026-09-22 23:03:06 +02:00
Vadim Zeitlin 621ee93962 Merge branch 'RibbonReader' of github.com:Blake-Madden/wxWidgets
Add keyboard navigation to Ribbon.

See #27046.
2026-09-21 23:14:42 +02:00
Richard cecc7ee4fd Document wxToolTip::Enable() platform limits
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.
2026-09-21 18:05:06 +02:00
Blake-Madden 2ab4d013d5 Document ribbon keyboard navigation 2026-09-21 11:47:01 -04:00
Vadim Zeitlin f387863363 Use GetScrollbarSize() instead of wxSYS_HSCROLL_[XY]
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.
2026-09-21 16:46:55 +02:00
Vadim Zeitlin b01632cf3b Implement wxAnimation::Get{FrameCount,Delat,Frame}() in wxGTK
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>
2026-09-19 12:57:54 +02:00
Vadim Zeitlin 3cdb10d42d Save DPI in wxPersistentTLW to handle DPI change correctly
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.
2026-09-14 02:39:45 +02:00
Vadim Zeitlin ac9827014f Flush file data to disk in wxTemp{F,}File::Commit()
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.
2026-09-11 17:36:13 +02:00
Vadim Zeitlin 793883bf19 Add wxFFile::FlushAndSync() calling fsync() too
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.
2026-09-11 17:36:13 +02:00
Vadim Zeitlin e88fd128cd Add wxGetFileDescriptor()
This function already existed internally, make it public as it can be
useful and will be used by wxFFile itself in the upcoming commit.
2026-09-11 17:36:13 +02:00
Vadim Zeitlin f85b357fbf Improve wxRenameFile() documentation
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.
2026-09-11 03:05:00 +02:00
Vadim Zeitlin b8896d9f7f Make wxRenameFile() really atomic under MSW
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.
2026-09-11 02:55:11 +02:00
Vadim Zeitlin f47de7bfd8 Add wxFileName::CopyAttributesFrom() and use it in wxTemp{F,}File
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.
2026-09-11 02:28:00 +02:00
Vadim Zeitlin ab3f5e7299 Merge branch 'aui-button-event'
Restore generation of wxEVT_AUINOTEBOOK_BUTTON events.

See #26978.
2026-09-10 17:58:22 +02:00
Vadim Zeitlin dcfc167163 Merge branch 'aui-wayland-drag'
Implement dragging AUI panes under Wayland.

See #26969.
2026-09-10 17:56:55 +02:00
ali kettab 0944f83f95 Update wxColourDialog documentation
Mention that wxEVT_COLOUR_CHANGED is also generated under wxQt starting from
wxWidgets 3.3.2
2026-09-10 15:35:37 +01:00
Blake-Madden 251a549713 Add MakeDisabled at the bitmap bundle level 2026-09-09 06:14:07 -04:00
Blake-Madden fd1576d9e8 Add keyboard accessibility to ribbon
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.
2026-09-08 13:53:58 +02:00
Vadim Zeitlin 6c08a692a6 Restore sending wxEVT_AUINOTEBOOK_BUTTON events
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.
2026-09-07 22:53:28 +02:00
Vadim Zeitlin 00b1557138 Add wxSystemSettings::ExceedsDragThreshold() and use it
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.
2026-09-05 15:28:38 +02:00
Vadim Zeitlin 75cc61293b Don't say that wxAUI_MGR_LIVE_RESIZE doesn't work in the docs
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.
2026-09-03 13:26:51 +02:00
PB 3edb98ee53 Update docs on wxMSW dark mode limitations
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
Update the information about the common windows dialog wrappers.
2026-08-27 08:14:41 +02:00
Daniel Kulp e3c466eb71 Support wxFileDialog extra controls in sandboxed apps on macOS
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.
2026-08-26 20:17:19 +02:00
Vadim Zeitlin 2268aeee82 Remove mentions of non-existent wxTHICK_FRAME from the docs
This symbol was removed back in 967a94c91a (remove
WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0 closes #15792,
2014-01-04).

Closes #26925.
2026-08-26 17:59:35 +02:00
Vadim Zeitlin 1b509e1b07 Merge branch 'msw-fix-initial-radiobox-layout'
Fix initial layout for radiobox using fixed size in wxMSW.

See #26893.
2026-08-26 14:28:01 +02:00
Vadim Zeitlin 4ca43f3401 Merge branch 'gtk-overlay-sb-client-size'
Fix client size computation in wxGTK when using overlay scrollbars.

See #26889.
2026-08-26 14:28:01 +02:00
Vadim Zeitlin 156e6ed112 Merge branch 'RibbonFixes2' of github.com:Blake-Madden/wxWidgets
Miscellaneous fixes and improvements to wxRibbon and its sample.

See #26870.
2026-08-26 14:28:01 +02:00
Paul Cornett a06818fa2d Small documentation fixes 2026-08-25 07:09:35 -07:00
Vadim Zeitlin afc350ce82 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.
2026-08-23 19:44:10 +02:00
Vadim Zeitlin b622f3a96a 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.
2026-08-22 20:16:53 +02:00
Vadim Zeitlin bd1d37f8f6 Merge branch 'use-appindicator'
Add AppIndicator-based implementation of wxTaskBarIcon in wxGTK.

Fixes #25992.

See #26715, #26845.
2026-08-22 14:33:04 +02:00
ykneandVadim Zeitlin 27e0196959 Add AppIndicator implementation of wxTaskBarIcon
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>
2026-08-22 14:31:27 +02:00
Richard 8c72d3e4b7 Fix MSW 1x1 rectangle drawing
Unix builds / Ubuntu 24.04 wxGTK ASAN not compatible (push) Canceled after 0s
Unix builds / Ubuntu 26.04 wxGTK UTF-8 (push) Canceled after 0s
Unix builds / Ubuntu 26.04 wxQt (push) Canceled after 0s
Unix builds / Ubuntu 26.04 wxX11 (push) Canceled after 0s
Unix builds / Ubuntu 26.04 wxGTK 2 (push) Canceled after 0s
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Canceled after 0s
Unix builds / Ubuntu 20.04 wxGTK gcc 7 static compatible 3.0 (push) Canceled after 0s
Unix builds / Ubuntu 22.04 wxGTK with wx containers (push) Canceled after 0s
Unix builds / Ubuntu 24.04 wxDFB (push) Canceled after 0s
Unix builds / Ubuntu 24.04 wxGTK UBSAN (push) Canceled after 0s
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Canceled after 0s
CMake builds / macOS latest wxGTK 3 Unix Makefiles (push) Canceled after 0s
CMake builds / MSW/MSVC wxMSW (push) Canceled after 0s
CMake builds / MSW/Clang wxMSW (push) Canceled after 0s
CMake builds / macOS latest wxOSX Ninja (push) Canceled after 0s
CMake builds / macOS 14 wxOSX Xcode (push) Canceled after 0s
CMake builds / macOS 14 wxIOS (push) Canceled after 0s
CMake builds / MSW/MSVC wxQt 5.15 (push) Canceled after 0s
CMake builds / MSW/MSVC wxQt 6.10 (push) Canceled after 0s
Mac builds / wxMac ARM ASAN not compatible (push) Canceled after 0s
Mac builds / wxMac Universal C++14 (push) Canceled after 0s
Mac builds / wxiOS Simulator on Silicon Mac (push) Canceled after 0s
Mac builds / wxiOS (push) Canceled after 0s
Mac builds / wxMac Intel C++17 (push) Canceled after 0s
Mac Xcode builds / iOS Simulator static (push) Canceled after 0s
Mac Xcode builds / macOS dynamic Release (push) Canceled after 0s
Mac Xcode builds / iOS static Debug (push) Canceled after 0s
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Canceled after 0s
MSW builds / wxMSW vs2022 DLL Release x64 (push) Canceled after 0s
MSW builds / wxMSW vs2022 Debug Win32 (push) Canceled after 0s
MSW builds / wxMSW vs2022 Release arm64 (push) Canceled after 0s
MSW builds / wxMSW vs2026 DLL Release x64 (push) Canceled after 0s
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.
2026-08-22 01:30:14 +02:00
Paul Cornett e0e49c3acb Fix documentation for wxRichTextCtrl::{Begin,End}StandardBullet()
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
2026-08-21 10:04:38 -07:00
Blake-Madden 467e612b4d Document set_colour_scheme parameter of wxRibbonMSWArtProvider
Refer to discussion in https://github.com/wxWidgets/wxWidgets/pull/26644
2026-08-17 07:34:23 -04:00
Vadim Zeitlin 174386d01e Add wxPATH_RMDIR_PARENTS flag support to wxFileName::Rmdir()
This is the equivalent of "mkdir --parents" option and allows to remove
all empty ancestors of the directory with it as well.
2026-08-16 15:24:04 +02:00
Vadim Zeitlin 59f3ad31a7 Merge branch 'wayland-session-mgmt'
Add support for Wayland session management protocol and use it for
wxPersistentTLW if available.

See #26793.

Closes #26324.
2026-08-09 19:33:53 +02:00
Blake-Madden c0133721e1 Document wxWebViewHandler::GetFile() ownership contract 2026-08-08 09:34:46 -04:00
mcorino fa331f4e0f Mark wxApp::DarkMode as wxMSW-only in the documentation
Add missing @onlyfor{wxmsw}.

Closes #26792.
2026-08-06 20:15:46 +02:00
Vadim Zeitlin a37d42c80e Remove documentation of non-existent wxPanel::OnSysColourChanged()
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.
2026-08-06 20:10:33 +02:00
Vadim Zeitlin 4d0e5449df Add support for Wayland XDG session management to wxPersistentTLW
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.
2026-08-06 19:23:27 +02:00
Vadim Zeitlin d13fad4371 Prefer calling wxMSW dark mode support "unofficial"
It's not "experimental" any longer, but we still want to make it clear
that this isn't supported as well as standard mode.

Closes #26752.
2026-08-04 18:40:42 +02:00
Yannick Duchêne bd44befcc2 Use variadic template for wxMakeGuard() in the documentation
Make the declaration in the documentation header a valid C++
declaration.

Closes #26769.
2026-08-02 21:15:49 +02:00
Yannick Duchêne 63f0ad1c6b Fix syntax errors in interface headers
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.
2026-08-01 13:46:48 +02:00
PB 780eab36dd Fix a sentence in wxStylusEvent docs
See #26746.
2026-07-30 19:01:50 +02:00
Vadim Zeitlin 949a4f9fab Merge branch 'fix-doxygen-custom-html'
Fix errors in HTML generated by Doxygen.

See #26714.

Closes #26716, #26718.
2026-07-26 13:58:16 +02:00
PBandVadim Zeitlin d35f172262 Update wxApp::SetAppearance() docs
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>
2026-07-26 13:56:52 +02:00
Vadim Zeitlin c831744802 Make wxApp::MSWEnableDarkMode() first parameter an enum
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.
2026-07-24 23:38:15 +02:00