Commit Graph
8284 Commits
Author SHA1 Message Date
Vadim Zeitlin bba76b7e07 Document actual behaviour of wxPoint ctor from wxRealPoint
The changes of 1f7a8a8 (Round, rather than truncate, in wxSize and
wxPoint operations, 2018-03-06) have invalidated the documentation that
had been previously added in 4c20f3d (Document that wxPoint(wxRealPoint)
ctor truncates, not rounds., 2013-04-16) to document the old behaviour.

Changing the behaviour once again doesn't seem to be desirable, but at
least synchronize the documentation with it again.

See #26099.

(cherry picked from commit eb64d55ea9)
2026-01-15 18:44:08 +01:00
Stefan Csomor 5debc95422 Ensure that application is always shown after launch under macOS
Post dummy event from applicationDidFinishLaunching, otherwise on some
macOS versions apps might not boot properly if no other events are
happening.

See #26095, #26098.

(cherry picked from commit 2f89cd2d6c)
2026-01-15 18:28:28 +01:00
moi15moi cc1c23bf6c Handle font names longer than 31 characters in wxMSW
Get the full font name using ::GetOutlineTextMetrics() if the name is
exactly 31 characters long, as it may indicate that it was truncated to
fit into LOGFONT::lfFaceName buffer which has fixed size of 32.

This commit is best viewed with Git --color-moved option.

See #25333, #26078.

(cherry picked from commit c73b1b12e1)
2026-01-10 19:23:31 +01:00
Lee Ockert 833ac77842 wxRichTextCtrl: Enhance macOS key bindings
Update key bindings for macOS to more closely match native behavior.

Currently, Cmd+Left goes to the left word boundary, and Cmd+Right goes
to the right word boundary, like on Windows (wxWidgets treats Cmd on Mac
as if it were Ctrl for keyboard modifier key purposes).  Alt/Opt+Left
and Alt/Opt+Right do nothing.

This change maps Cmd+Left to the start of the line, and Cmd+Right to the
end of the line.  It also maps Alt/Opt+Left to WordLeft() and
Alt/Opt+Right to WordRight(), which is conventional on native Cocoa
controls (including other wxWidgets controls that map directly to Cocoa
controls).

See #26064, #26066.

(cherry picked from commit 2048a6871c)
2026-01-03 15:09:20 +01:00
Vadim Zeitlin 0d2c29beb3 Don't use first image for wxListCtrl items without any image
Native wxListCtrl in wxMSW behaved inconsistently with the generic one
and used the first image for the new items inserted into it even if no
image was explicitly specified.

Work around this unhelpful native behaviour by using I_IMAGENONE for the
items without images.

See #26062.

(cherry picked from commit 2ab82b5a20)
2026-01-02 17:44:16 +01:00
Vadim Zeitlin 73f6213c7c Update copyright years to 2026
ABI check / ABI check (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK with ASAN (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK ANSI (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxMotif (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 STL (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
CMake builds / macOS 14 wxOSX (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 Debug Win32 (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
Just run misc/scripts/inc_year and commit the results.

See #18690.
2026-01-01 17:41:46 +01:00
Václav Slavík ea45ac71c8 Fix wxChoice::GetBestSize() on macOS 26
See #26058.

(cherry picked from commit 2707aa59b4)
2025-12-31 16:06:45 +01:00
Vadim Zeitlin 33178123ad Record check sums for 3.2.9 release 2025-12-14 01:20:06 +01:00
Vadim Zeitlin 8385ce21ae Update version to 3.2.10 2025-12-11 19:05:13 +01:00
Vadim Zeitlin ff59392b37 Optimize generic wxHeaderCtrl drawing and work around wxOSX bug
Don't draw all the columns, there is no need to do it for those scrolled
out of view.

As a side effect, don't rely on wxDC::SetDeviceOrigin() for the
coordinates translation but do it ourselves in the drawing code: this is
pretty trivial in this case and avoids a bug in wxOSX which doesn't seem
to honour device origin in its wxRendererNative implementation, somehow.

See #26014, #26016.

(cherry picked from commit 411430b835)
2025-12-07 23:36:44 +01:00
Vadim Zeitlin 4cc7ba11fd Update release files for 3.2.9
ABI check / ABI check (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK with ASAN (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK ANSI (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxMotif (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 STL (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
CMake builds / macOS 14 wxOSX (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 Debug Win32 (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
Mostly just follow the instructions in docs/contributing/how-to-release.md
2025-12-06 19:41:50 +01:00
Vadim Zeitlin 870f101097 Put change log entry for parent commit in the correct section
This was a wxGTK fix, not wxOSX one.

See #26006.
2025-12-06 19:34:51 +01:00
Paul Cornett e9dcd4cc24 Fix deleting wxTextCtrl in wxEVT_TEXT_ENTER handler in wxGTK
Disconnect the signal handler to ensure it doesn't get called during the
control deletion.

See #26006.

(cherry picked from commit e6318ca7d5)
2025-12-06 18:35:42 +01:00
Vadim Zeitlin c1129d0f9a Don't use border for button part of generic wxSpinCtrl
Limit explicit border to be around text control, not the spin button,
which looks very wrong.

See #26002.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>

(cherry picked from commit 0b97a4f25e)
2025-12-06 18:17:23 +01:00
Robert Roebling 21e076fa79 Correct wxSpinEvent GetPosition() if start value is non-zero
Set wxSpinButton start value to start value of wxSpinCtrl, otherwise the
generic control used in OSX would report a wrong value in EVT_SPIN.

See #26002.

(cherry picked from commit 5178043b3e)
2025-12-06 18:17:00 +01:00
Vadim Zeitlin e2850919b1 Fix initial scale of wxGLCanvas under EGL/Wayland
The scale of the canvas was set up correctly only once we received
"size-allocate" signal from GTK, but this doesn't necessarily happen
when the window is first shown and after its scale factor is actually
known.

Ensure that we use the correct scale by catching the notification about
its change too. This makes buffer scale factor correct from the very
beginning, without having to wait for a resize.

See #23733, #25465.

(cherry picked from commit 036087097b)
2025-12-03 15:22:32 +01:00
Alex ShvartzkopandVadim Zeitlin a06400f9ae Support EGL 1.4 instead of previously required 1.5
Check for the availability of eglCreatePlatformWindowSurfaceEXT() if EGL
version is < 1.5 and use it if it's available, as it allows applications
using wxGLCanvasEGL to work on some (many?) systems without EGL 1.5
support.

See #22325.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>

(cherry picked from commit 602b80d896)
2025-12-03 15:22:32 +01:00
Vadim Zeitlin 46d47d3bb7 Use 24bpp backing store bitmap in wxMSW to speed up drawing on it
Avoid the overhead of converting the backing store bitmap to DIB and
back when drawing bitmaps with alpha on it in AlphaBlt(), which may be
very significant, by using 24bpp bitmap: as it doesn't have alpha, it
doesn't need to be adjusted after drawing on it.

This is ugly and it would be better to have a better implementation of
AlphaBlt(), but it's not clear how to do it, and for now this fixes a
real user-visible problem.

See #14403, #23841.

(cherry picked from commit b732393986)
2025-12-03 15:22:32 +01:00
Kees-van-der-Oord-Nikon bfdd0df6da Add support for HTML 5 charset attribute in wxHtmlParser
ABI check / ABI check (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK with ASAN (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK ANSI (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxMotif (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 STL (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
CMake builds / macOS 14 wxOSX (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 Debug Win32 (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
See #25546.

(cherry picked from commit 59ed646ae3)
2025-11-25 18:14:29 +01:00
Vadim Zeitlin d921cac94f Merge branch 'scintilla-screenreader-3.2' of github.com:MaartenBent/wxWidgets into 3.2
ABI check / ABI check (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK with ASAN (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK ANSI (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxMotif (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 STL (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
CMake builds / macOS 14 wxOSX (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 Debug Win32 (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
Improve wxStyledTextCtrl compatibility with screen readers (3.2).

See #18683, #25956, #25963.
2025-11-09 17:24:43 +01:00
Vadim Zeitlin 33d52db867 Fix compilation problem due to memset_s() when using PCH
ABI check / ABI check (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK with ASAN (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK ANSI (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxMotif (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 STL (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
CMake builds / macOS 14 wxOSX (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 Debug Win32 (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
Define __STDC_WANT_LIB_EXT1__ in wx/platform.h, which is included before
the standard headers even when using PCH, to make sure memset_s()
declaration is available in this case too.

See #24687.

(cherry picked from commit e913e9eba4)
2025-10-31 14:59:58 +01:00
Vadim Zeitlin 2ec9a3c741 Recalculate wxGenericTreeCtrl line height after font change
This ensures that the items always consume as much space as they need
vertically and not more.

See #16428.

(cherry picked from commit 3e937bbd19)
2025-10-25 23:47:01 +02:00
Stefan Csomor 9317d44a20 Fix handling filters in wxFileDialog in wxOSX
As allowedTypes were restricted to the first filter expression, choosing
another filter only showed the files conforming to both expressions
instead of only applying the selected filter.

This commit is best viewed ignoring whitespace-only changes.

Fixes wxWidgets/Phoenix/issues#2806

See #25918, #25922.

(cherry picked from commit b153aafee9)
2025-10-25 17:44:33 +02:00
Blake-Madden 04bd8091ae Fix bitmap position in wxDC::DrawLabel() in high DPI
Use bitmap size in logical, not physical, pixels to position it
correctly.

See #25888.

(cherry picked from commit 23083720a9)
2025-10-19 16:01:44 +02:00
DietmarSchwertberger 1a1a6838d4 Fix selecting individual columns with Ctrl-Click in wxGrid
This didn't work correctly because the check if the column was already
selected in wxGridColumnOperations::IsLineInSelection() used incorrect
parameter order when calling IsInSelection().

See #25884.

(cherry picked from commit c7e5734797)
2025-10-15 22:29:35 +02:00
Federico Perini f2cff7f490 Avoid using already destroyed timers in wxOSX
Check that the timer is still valid before using the associated object.

This is necessary because already queued timer events are still
delivered, even if wxTimer is destroyed.

See #25871.

(cherry picked from commit f25aec1b38)
2025-10-10 10:07:11 +02:00
Václav Slavík 46cfa36c09 Fix nested markup conversion to NSAttributedString
wxMarkupToAttrStringBase implementation of markup parsing failed to
correctly apply nested attributes: in e.g. <i><b>foo</b></i>, only the
outer attribute was in effect.

This was due to applying - and overwriting - attributes to a span in
OnAttrEnd(), which is called first for the inner span, and then for the
outer one, overwriting all inner changes.

Instead, apply the currently effective attributes to text in OnText(),
similarly to how wxMarkupParserRenderOutput does it. As a side effect,
this also eliminates the need to apply default font to the entire range
first.

See #25864.

(cherry picked from commit ca05aee2f8)
2025-10-07 15:03:19 +02:00
Vadim Zeitlin a6fc33b416 Don't link with unnecessary and now removed AGL framework
This framework has apparently been deprecated since quite some time and
was removed from macOS 26, so linking with it resulted in an error.

Don't do this any longer.

See #25798.

(cherry picked from commit dd3f250949)
2025-09-16 13:23:17 +02:00
Vadim Zeitlin 07495d603b Don't leak surface every time wxOverlay is used in wxGTK
Free the old surface pointer before overwriting it with the new one in
wxOverlayImpl::EndDrawing().

This resulted in huge memory leaks when using wxOverlay repeatedly, e.g.
while dragging something around the window.

See #24500.

(cherry picked from commit 34e6866683)
2025-09-09 01:14:38 +02:00
Richard 498f4fe92a Document that wxIMPLEMENT_APP must be used in global scope
As this macro defines main(), it can't be used inside any namespace.

See #25772, #25775.

(cherry picked from commit 02cd327f0e)
2025-09-08 23:10:38 +02:00
Vadim Zeitlin ab1c1f2336 Fix check for extended locale functions in CMake
HAVE_LOCALE_T is misnamed, as it must only be defined not just when
locale_t type is available but when the functions using it, such as
strxxx_l(), are available.

Due to the confusion about the nature of this symbol, CMake didn't check
for it correctly and only checked for its existence, but musl (used by
e.g. Alpine) does define the type without providing any of the functions
using it, which resulted in build errors later.

Fix this by checking for both the type and the functions in CMake too,
just as we do in configure.

See #25749, #25750.

(cherry picked from commit 170c386314)
2025-09-02 01:37:09 +02:00
jey5nd6 323016cded Fix showing extra controls in wxFileDialog under macOS
ABI check / ABI check (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK with ASAN (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK ANSI (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxMotif (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 STL (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
CMake builds / macOS 14 wxOSX (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 Debug Win32 (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
These controls were not shown due to a forgotten colon in the test for
setAccessoryViewDisclosed support added in e765756555 (OSX file dialog
extensions (#2592), 2021-11-26).

Fix this simply by adding the colon, which is part of the method name,
but also avoid calling this method for save file dialogs which not only
don't need it, but result in an immediate application exit if it is
called on them.

See #25717.

(combined cherry pick from 426f745c6b and
32ea27c34f)
2025-08-23 20:20:47 +02:00
Vadim Zeitlin c363545d12 Fix window size after unmaximizing it in XFCE/MATE
Workaround for Mutter from 9537141500 (Fix handling window total size
under GNOME with X11, 2025-04-28) broke the well behaving WMs used by
other desktop environments, such as XFCE, as it resulted in the window
size being mistakenly adjusted after the decorations size was changed
due to restoring a previous maximized window.

Prevent this from happening by not adjusting the size after the window
has been already mapped.

See #25348, #25349, #25708, #25711.

(cherry picked from commit 9b73719543)
2025-08-22 00:49:21 +02:00
Vadim Zeitlin 9b0dd3817a Reduce GDI resource usage in wxMSW wxStaticBitmap
Free unused bitmaps in wxMSW wxStaticBitmap to reduce GDI resource usage
in this class.

See #25698, #25699.

(cherry picked from commit a39832140e)
2025-08-18 00:17:07 +02:00
Václav Slavík c13eadfb44 Fix MSVS debug visualizer of wxStrings
Fix the visualizer to display full Unicode string.

Previously, only the first character was shown in recent versions of
Visual Studio. This was due to the use of "sb" format specifier meaning
an ANSI string.

Use condition expressions to cover both wchar_t and UTF-8 builds.

Correct the specifier for UTF-8 case to be "s8b" so that it interprets
and displays UTF-8 correctly.

See #25684.

(cherry picked from commit 77dd42f3c6)
2025-08-17 23:44:48 +02:00
Vadim Zeitlin 30c0f6a675 Fix readlink problem in configure build under macOS < 12
Don't use "readlink -f" as readlink doesn't support this option in macOS
11 and earlier. Just construct the full path ourselves instead.

Closes #25675.
2025-08-02 15:22:14 +02:00
Vadim Zeitlin a456327d50 Fix assert checking for wxSocket flags compatibility
While wxSOCKET_NOWAIT is incompatible with wxSOCKET_WAITALL, using
wxSOCKET_NOWAIT_READ and wxSOCKET_WAITALL_WRITE should be allowed, but
it was not.

Fix this and also split the assert in two for a bit more clarity.

See #17114, #25665.

(cherry picked from commit 943e4fb18d)
2025-08-01 00:40:50 +02:00
Vadim Zeitlin 99daac0eea Make wxPlatformInfo::Get() thread-safe
Protect gs_platInfo initialization with a critical section to ensure
that we don't try to do it in parallel from more than one thread,
resulting in crashes.

See #25459, #25464.

(cherry picked from commit a26eda72e8)
2025-07-30 23:38:01 +02:00
Vadim Zeitlin 7be5d6b6f4 Really fix generic wxActivityIndicator dots contrast
These dots should just use the window foreground colour instead of using
the hardcoded colour -- it will still be the same as before by default
but could be different (and better) now if different colours are used
for the window.

See #25405.

(cherry picked from commit c0089d90b0)
2025-07-30 23:35:23 +02:00
Vadim Zeitlin 769bddb9e3 Do generate wxEVT_CHAR for Ctrl-Letter even in non US layouts
Use the key translated to the US layout by XKB and not the actual
character produced by the key in the current layout when determining
whether to generate wxEVT_CHAR for key presses with Ctrl or not.

This ensures that we produce the expected events for Ctrl-Latter in all
layouts and not just the ones using Latin letters.

See #25384, #25385.

(cherry picked from commit 57c33bb9ed)
2025-07-30 23:33:34 +02:00
Maarten Bent 082d1fd28a Fix TAB behaviour in a panel with notebook as only active child
If a panel contained a notebook and some other element(s) that didn't
accept focus (e.g. because they were disabled), TAB didn't wrap around
correctly. Fix this by ensuring the focus gets to the notebook itself in
this case by handling it in wxNotebook itself if the parent didn't do
anything.

See #25443.

(cherry picked from commit a2ed8ac9e6)
2025-07-30 23:29:20 +02:00
Vadim Zeitlin 26eb2a7ecb Fix crash when copying wxBitmaps in wxMSW if DIB creation fails
This shouldn't normally happen, but if it does, e.g. because all the GDI
resources have been exhausted, we still shouldn't crash, so check for
this.

See #24703, #24705.

(cherry picked from commit a6203be954)
2025-07-28 16:25:25 +02:00
Vadim Zeitlin 47041891cf Avoid collapsing wxDVC node if already done by event handler
If an event handler for wxEVT_DATAVIEW_SELECTION_CHANGED called
Collapse() itself (which is weird but allowed), Collapse() still tried
to collapse it again, which could result in the count of items becoming
negative and all sorts of other problems.

Avoid them by not doing anything if the item has been collapsed after
the selection change.

See #25638, #25631.

(cherry picked from commit 0396c2661f)
2025-07-28 16:25:25 +02:00
Vadim Zeitlin d63adfdda3 Don't assert in wxGridSizer::Calc{Cols,Rows}() if sizer is empty
When the sizer is completely empty, it makes more sense to return 0
from these functions without asserting.

See #25642, #25641.

(cherry picked from commit d1be72aa8e)
2025-07-28 16:25:25 +02:00
Paul Cornett 4f6a150398 Use system default titlebar decorations under Wayland
See #25562

(cherry picked from commit afb11cf2eb)
2025-07-28 16:25:25 +02:00
Vadim Zeitlin 3afd58cc97 Fix memory leak in wxColour::Set() in wxOSX
Don't overwrite the existing m_refData in wxColour::InitRGBA()
implementation, as this could result in leaking it.

Ensure that we are its unique owners, which allocates it if necessary,
and then assign to the existing object instead.

See #25569.

(cherry picked from commit c7e5ac12e6)
2025-06-26 00:28:11 +02:00
Vadim Zeitlin 5c0a6e3460 Fix wxLogApiError() in wxNO_IMPLICIT_WXSTRING_ENCODING build
This function needs to compile with wxNO_IMPLICIT_WXSTRING_ENCODING
defined, as there are some calls to it in wx headers (at least
wx/msw/private.h which, unfortunately, gets included when PCH is used,
i.e. practically always with MSVC).

Fix its compilation in this case by using wide char __TFILE__ instead of
__FILE__ which would have to be wrapped in wxString::FromAscii() or
FromUTF8().

See #25568.

(cherry picked from commit 1be2e487e3)
2025-06-25 22:44:24 +02:00
Vadim Zeitlin fa13bf8bee Don't crash on start up if macOS system font encoding is unknown
If the encoding is not recognized (which is the case at least for the
encoding used for Persian/Farsi), wxLocale::GetSystemEncoding() returns
wxFONTENCODING_DEFAULT and wxFont::SetDefaultEncoding() must not be
called in this case, as it asserts and, due to a separate bug, crashes
as the GUI is not fully initialized yet when wxApp::Initialize() is
executing.

See #25561.

(cherry picked from commit 5de590ffaf)
2025-06-24 17:22:15 +02:00
Maarten Bent 8bd21d511f Backport CMake changes
With backports of:

5513114673
CMake: Create all mswu include directories when installing

1dc7334851
CMake: Fix monolithic build with static wxWebviewEdge

3a48ac75ed
CMake: Add option to force all builtin libraries

51037ff728
Add wx/msw/mfc.h to file list

ecf2b0dcd7
Fix wx-config created in CMake build with custom flavour

2ec276affc
CMake: Fix iOS OpenGL warning

e1f0a938f6
CMake: Fix using Cotire for precompiled headers

35e3c14cb4
Fix library naming when cross compiling for Windows using CMake
2025-06-10 02:39:04 +02:00
Maarten Bent f4a0928668 Fix wxTreeCtrl indent regression
See #25282.

(cherry picked from commit 6dc66a9d2ae979b8d0ba2c0b4364aba8bc005bc7)
2025-06-10 02:39:04 +02:00