We must always change the text colour when using non-default background
colour, as otherwise the text may become unreadable in some themes,
which was exactly what happened in the standard "High contrast" theme
when using wxAUI under MSW before.
Closes https://github.com/wxWidgets/wxWidgets/pull/1989Closes#18832.
This was recently broken in 3bcbc8fe8e (Implement dismissal for
unfocused wxPopupTransientWindow, 2020-07-09) as the changes in it
resulted in the popup being dismissed as soon as it was opened with a
mouse click.
Fix this by changing several things:
- Check for wxCurrentPopupWindow before processing the message, not
after, as the message handler itself could create a new popup and we
definitely don't want to dismiss it immediately after its creation.
- Check for mouse DOWN events only, not UP and DBLCLK ones, as otherwise
it might be possible that UP matching the same DOWN whose handler
showed the popup would dismiss it. As for DBLCLK, it's just
unnecessary, as it should be always preceded by a DOWN message anyhow.
- Don't dismiss the popup if the message is sent to it or one of its
children, as in this case the popup itself is supposed to deal with it
(as wxComboCtrl popup does) and we don't want to prevent it from doing
it.
With these changes both wxComboCtrl and wxTipWindow seem to work as
expected.
Closes#18844.
Enable and fix keys processing in wxSymbolListCtrl::OnKeyDown().
Also set focus to this control initially as it's more useful and it's
expected that cursor arrows can be used to move the selection in it
rather than changing selection in the font comboboxes.
Note that "Enter" key still doesn't work correctly, i.e. doesn't close
the dialog when it's pressed in the symbols list control.
Closes#16033.
Co-authored-by: Igor Korot <ikorot01@gmail.com>
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
wxGCDC is often used from wxEVT_PAINT handler and showing an assert
dialog from any of its methods results in wxEVT_PAINT being generated
again, resulting in another assert and abort, which is not useful, so
remove this assert to at least avoid crashes whenever unsupported
logical function is used, as it happens e.g. in the "Mask Screen" of our
own drawing sample.
Although caller of wxWebViewEdgeImpl::GetSettings() check if it returns
NULL and handle it gracefully, this function itself can crash if it's
called too early, i.e. if ICoreWebView2 hasn't been created yet.
Add a check to avoid this and just return NULL settings in this case.
Closes#18840.
This completes the changes of the previous commit and should ensure that
UnInit() is always called, whoever is destroyed first -- the managed
window or the manager itself.
Also update the documentation to mention that calling UnInit()
explicitly is not necessary any longer.
This colour is more appropriate when using wxGTK and is the same as the
previously used wxSYS_COLOUR_CAPTIONTEXT in wxOSX and should be also a
good choice for wxMSW.
Closes https://github.com/wxWidgets/wxWidgets/pull/1966
Commit 0fe1146b19 (Cache the result of inotify check in configure,
2020-04-15) was wrong as it defined wxHAS_INOTIFY inside the
AC_CACHE_CHECK(), meaning that this wasn't done at all if the value was
already cached.
Fix this by crrectly defining wxHAS_INOTIFY if inotify() availability
was either detected or cached.
Use non-standard but convenient AX_SUBDIRS_CONFIGURE() macro instead of
the standard AC_CONFIG_SUBDIRS() for libtiff, in order to allow passing
extra options to this sub-configure script without affecting any other
sub-configure ones and also without wrongly caching these options as
part of the main configure options, as happened before.
This notably fixes the problem with running "config.status", which
complained about unknown "--disable-jbig" and similar options, as they
were cached by the previous configure run.
We could also manually remove these options from ac_configure_args, but
doing it like this seems cleaner and simpler.
Since the changes of ef2b015e39 (Export CC and similar variables for
sub-configure scripts, 2018-10-20), using "-C" option with configure
didn't work any longer when also using built-in libtiff or expat, as
their configure scripts aborted due to detecting inconsistent build
environment because the values of exported CC etc variables they saw
differed from the values in the cache file.
Fixing this seems to be difficult, as we'd need to update the cache
before running the sub-configure scripts (which is simple enough), but
also remove the cached entries from it after doing it, as otherwise we'd
get the same inconsistent build environment problem simply by running
"configure -C" without any other options twice in a row, because the
first run would cache CC=gcc etc.
So work around this instead by disabling cache when exporting these
variables. And to make this workaround less annoying, restrict it to
only the cases when it's really needed, i.e. when we do modify these
variables in a non-trivial way.
With these changes, "configure -C" works again, but only uses caching if
possible.
Check that all our public headers compile with this macro defined and
that using a char string without specifying its expected encoding
results in the expected compilation failure in this case.
Platform native behaviour is not to show a filter, but to allow all
supported types to be selectable. Make sure GetFilterIndex still is a
valid choice (and not -1 as before).
Closes https://github.com/wxWidgets/wxWidgets/pull/1976
The refactoring in the commit 51ea713826 (Extend and rename
wxSocketImpl::UnblockAndRegisterWithEventLoop(), 2019-11-20)
accidentally inverted the test for wxSOCKET_BLOCK, restore the correct
logic to make non-blocking sockets work again.
Closes#18834.
Make Get[MultiLine]TextExtent() behave consistently for empty strings on
all platforms, in particular return (0, 0) size for them from
GetTextExtent() in wxGTK, which is an incompatible change but is needed
to make it behave in the same way as the others.
See https://github.com/wxWidgets/wxWidgets/pull/1970
wx public headers are not supposed to include platform-specific headers
defining many macros that can conflict with the identifiers defined in
the application code. In this particular case, including CoreServices.h
ultimately #included AssertMacros.h, which by default on older SDKs
(<10.12) introduces various macros whose names very easily conflict with
user code.
For example, if you #included <wx/fswatcher.h> in your own code, and
your code happened to contain a symbol called 'check', or 'verify',
compilation failed.
Fix this by using pImpl idiom to move the variable requiring a type
defined in the SDK header into the source file.
Closes https://github.com/wxWidgets/wxWidgets/pull/1666
The compiler is smart enough to determine that the variables are always
initialized when they're actually used when using optimizations, but
gives a bunch of C4701 warnings for them if we don't initialize them in
the non-optimized debug builds.
It helps demonstrating how the layout works and is consistent with the
other windows in the sample (which are frames and so are resizeable by
default).
Closes#18830.
No real changes, just rename the over generic MySizerDialog to a more
specific MyNotebookWithSizerDialog, as the goal of this dialog seems to
be to demonstrate using wxNotebook and sizers together.