Previously this was used only for linking the samples, which ensured
that they found the libraries directly referenced by them, but this
wasn't enough to find the libraries referenced indirectly, via another
library (e.g. wxxml used by wxxrc internally but not necessarily
referenced by the sample using XRC) because DT_RUNPATH is not used in
this case, as documented in Linux ld.so(8).
Ensure that such libraries are found nevertheless by setting runpath
for all the libraries too.
Note that it would probably be more logical to just get rid of
SAMPLES_RPATH_FLAG and use DYLIB_RPATH_FLAG everywhere, but this would
result in a ton of changes, so keep the old variable for now and just
set it to the same value to avoid this and keep the possibility to
change it to a different value if necessary later.
Stop consuming all wxEVT_KEY_UP events in wxGrid as this broke the
standard keyboard handling: pressing and releasing "Alt" didn't give
focus to the menu bar when wxGrid had it.
This also seems completely unnecessary.
Closes#24246.
See #24247.
Restrict the input to not allow values that are greater than the
positive maximum or less than the negative minimum.
In many cases it is not necessary to allow invalid characters to be
entered. For example, if the specified range is 0 to 100.
See #24220.
This function was replaced with a more useful function taking
wxOrientation and returning wxSize in bbba3b7cb9 (Make
wxAuiToolBar::RealizeHelper() return value actually useful, 2023-12-25)
but there is some existing code using the old RealizeHelper() from its
overridden Realize(), so restore it for compatibility, even if it's
quite useless now.
See #24023, #24164, #24244.
This ensures that any messages passed to wxLogError() or other functions
are shown before wxMessageBox() that could be referring to them instead
of it happening while the message box is shown (most ports, including
wxGTK) or only after it is dismissed (wxMSW).
See #24231.
Closes#24228.
This commit reverts 055c4cbed5 (Fix crash on shutdown if wxConfig
couldn't be saved, 2024-01-04) and implements an alternative solution
mentioned in that commit log message by setting wxTheApp to null pointer
before calling CleanUp().
This ensures that wxLog creates wxLogOutputBest if necessary instead of
recreating wxLogGui which can't be safely used once the cleanup starts:
under MSW the dialog used by it can't be shown once the GUI objects are
destroyed, so logging from CleanUp() still resulted in crashes under
this platform, even after the previous fix.
This change might affect some existing code using wxTheApp during
shutdown but it seems like the only really safe thing to do.
See #24252.
Although TAB and Ctrl+I generate the same key code in the events passed
to wxEVT_CHAR handlers, it seems more reasonable to only consider the
former to be in "TAB category", but not the latter.
See #10268.
Closes#24254.
webview_chromium.cpp requires using C++17 as it includes CEF headers
that require it (e.g. they use std::in_place) and we need to use the
same options all files in this project as they share the same PCH, so
just use C++17 for all of them -- it should do no harm.
The previous error didn't make sense if CMAKE_CXX_STANDARD wasn't set,
so use a slightly different message in this case.
Also improve the comment explaining why we need C++17 in the first
place.
Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
Previously CMake would give an error if CMAKE_CXX_STANDARD wasn't
explicitly set to C++17 or greater when using CEF, but this is not
really needed if the compiler supports C++17 without any non-default
options, so check for this too.
If a panel window is hidden, then don't include its size when laying out
the ribbon bar. After toggling a panel's visibility, calling Realize()
and Layout() will properly include the panel (if shown) or not show it
and move panels to the right of it over (without a blank gap in the
ribbon bar where the hidden panel would be).
Closes#24237.
wxMSW could already be compiled for ARM with MSVC, but due to not
defining any ARCH_SUFFIX for ARM, makefile.vc used to place objectsi
and libraries to the same folder as x86 objects and libraries.
A completely different question is what kind of Windows runs on 32-bit
ARM, and whether one can run regular desktop apps on it.
This commit mimics what f69dbaa1 did for ARM64, and adapts it for ARM.
Closes#24222.
Without a DLL export declaration on this class MSVS complains about
using it as a base class for DLL-exported wxImageList, so do provide
this declaration, even if it's not normally necessary because there are
no member functions of this class in the shared library, just to avoid
the warning.
Closes#24232.
While such arrays are deprecated, we still use some of them, e.g. in
wxAUI code, so make using them slightly less painful by allowing
iterating over them naturally.
If it isn't, as is the case for MSVS for example, we don't need to set
wxHAVE_CEF_DEBUG anyhow, as it's set automatically if _DEBUG is defined
during the build.
Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
This notably fixes crash with SVGs using 1 stop gradients.
Relax the check in a test added in #24064 as it doesn't quite pass with
the new version -- this is somewhat suspicious but as it wasn't really
clear where did the original tolerance of 3 come from, it doesn't seem
to be a huge problem to increase it to 4 neither.
Closes#24213.
Really fix wxSetCursorEvent handling for wxAUI done in commit f608b34
(Send set cursor events whenever there is mouse movement) without
breaking the other controls, i.e. wxSplitterWindow, wxHeaderCtrl and
wxGrid.
Pass the mouse position by const reference to QtSendSetCursorEvent().
Closes#24217.
To find a page by ID currently you have to use a recursive FindWindow
(which would also look at the child Panel windows). This function allows
for finding a page by ID more elegantly.
Closes#24211.