1) Link with the wayland-egl library, but do so only if we determine that we
have Wayland support in the GDK backend with a compile test.
2) Provide a way to force disable the EGL backend.
* adding native font descriptor serialization = v2
* remove common xml prefix from serialized string
* Update src/osx/carbon/font.cpp
Co-authored-by: VZ <vz-github@zeitlins.org>
* Update src/osx/carbon/font.cpp
Co-authored-by: VZ <vz-github@zeitlins.org>
* static string via accessor
* striping off xml preamble unconditionally
if we use a different format in the future, we will have to increase our version number
* applying italic directly to the font descriptor
thus preserving attributes in the native font descriptor which we don’t store explicitly yet
* Adding support for preserving font width
Although we don’t express this in the public API yet, we try to preserve eg condensed, when changing the font width
* Adding reference, bug fix
double checked the font weight constants,
Co-authored-by: VZ <vz-github@zeitlins.org>
This fixes another problem similar to the one fixed in be1854c617 (Avoid
UI functions in non-main thread in wxGStreamerMediaBackend, 2020-09-02)
and does it in a similar way: SetupXOverlay(), which calls gdk_flush(),
was called from gst_bus_sync_callback() which is executed in the worker
thread, so use CallAfter() to call it from the main thread later.
In aa2cd42206 (Report video size changes to the media backend,
2016-02-22), a couple of calls to NotifyMovieSizeChanged() were added,
presumably for a good reason. Unfortunately, NotifySizeChanged() makes
UI calls on wxGTK, so this resulted in UI calls happening on a non-main
thread because many of GStreamer's callbacks occur on arbitrary threads.
This is bad because it caused random X11 crashes.
Fix this by calling NotifyMovieSizeChanged() with CallAfter().
Closes https://github.com/wxWidgets/wxWidgets/pull/2042
Draw wxTextCtrl focus ring natively on Mac.
Add wxWindow::EnableVisibleFocus() to explicitly control the focus ring
visibility if necessary.
See https://github.com/wxWidgets/wxWidgets/pull/2037
Although @"UIApplication" is supposed to be used by default anyhow,
passing "nil" is reported to result in an assertion failure in
'_UIApplicationGetPrincipalClass' when running under the iOS 13.1
simulator, so pass this string explicitly.
Closes https://github.com/wxWidgets/wxWidgets/pull/2035
If a Caret is default-constructed, the width and height are still 0,
and the wxBitmap::Create implementations expect valid sizes.
The same applies for the bitmap after a size change.
Check compilation of all wx headers with all gcc warnings enabled.
This should make it impossible to introduce problems that only appear
when -Wpedantic or -Wany-other-not-completely-unreasonable-warning is
enabled when building user code including wx headers again.
See https://github.com/wxWidgets/wxWidgets/pull/2033
Fix name of wxrc executable when cross-compiling from Unix.
Note that the Makefile hasn't been rebaked after the changes of
f3bd129568 (Append WX_FLAVOUR to the name of wxrc executable,
2020-08-06), so this commit reflects the changes to wxrc.bkl from both
that commit and this one.
Closes https://github.com/wxWidgets/wxWidgets/pull/2041
Avoid calling GeTDPI() in font.WXAdjustToPPI(GetDPI()); invocations in
common code on platforms that don't need any adjustment (i.e. anything
other than MSW).
This fixes wxOSX crashes when GetFont() is called too early during
window creation, but is the right thing to do regardless.
Closes https://github.com/wxWidgets/wxWidgets/pull/2036Closes#18903.
We don't use "final" in our code, as very few classes in wx code have
virtual functions but are not meant to be derived from in the user code.
Ideal would be to check the existing warnings and maybe apply "final" if
it's relevant and disable it otherwise, as these warnings can be useful
to build the application code with, but for now just disable them in the
test suite.
The error message
wx/string.h:558:47: error: missed loop optimization, the loop counter may overflow
[-Werror=unsafe-loop-optimizations]
for ( Cache::Element *c = cacheBegin; c != cacheEnd; c++ )
~~^~~~~~~~~~~
doesn't seem to really make much sense, as it shouldn't overflow here.
NSTextView does not natively show a focus ring by default, and it is
extremely rare thing to do in native applications.
Don't do it in wxTextCtrl either.
Add wxWindow::EnableVisibleFocus() for changing focus ring behavior on
macOS (currently not implemented elsewhere, although GTK+ has a
discouraged option to do it).
Allow applying gcc "format" attribute to other functions and do apply it
to wxStrftime().
Also suppress -Wformat-nonliteral inside wxStrftime() itself, as it's
now supposed to be checked when calling it.
This avoids conflicts with another method with the same name defined in
generic wxGenericFileDirButton, which must neither override nor hide
this method of wxButton.
This ctor is not needed as the inherited wxObject ctor is sufficient and
defining it but not operator=() explicitly results in -Wdeprecated-copy
from gcc 10.
When the original wxGCC_WARNING_SUPPRESS was added, clang understood all
gcc warnings, so it made sense to also apply it when building with
clang, but recent gcc versions have added warnings not available in
clang any more, so we now need a macro for disabling warning the
warnings for gcc only.
Perhaps we should rename the existing wxGCC_XXX macros to use
wxGCC_OR_CLANG prefix.
Due to what looks like a bug, gcc 9.3.0 gives the following incomplete
error message without it:
include/wx/graphics.h:278:7: error: but
‘wxGraphicsGradientStop::wxGraphicsGradientStop(wxGraphicsGradientStop&&)’
does not throw; perhaps it should be declared ‘noexcept’
[-Werror=noexcept]
(without any other diagnostics).