It doesn't seem worth having it when it's only used in a couple of
places in a single file, unlike GetHwnd() which is used in dozens of
places across entire wxMSW.
Override MSWGetFocusHwnd for wxSpinCtrl to focus the right subwindow.
So the correct window will be used in wxWindowMSW::SetFocusFromKbd and
the spin controls content will be selected on TAB key.
Under MSW allow override which subwindow will be focused for composite
windows which are implemented not as a set of wxControl (i.e. using only
Windows native controls).
Setting invalid colour is supposed to work and reset the background to
the default one, but asserted and then crashed due to triggering another
assert while trying to repaint the window while the assert dialog was
shown, in wxX11.
Fix this in the most expedient way by just resetting the background
colour to its initial value.
A better fix would be to leave it invalid but provide an accessor
returning the default value if the background colour is not defined.
Caused by arithmetic overflow of a signed addition and subsequent
right-shift of that (now negative) value and use as an array index.
Could only realistically occur on platforms where long is 32 bits.
See #18550
Implicitly-declared 'constexpr wxDataFormat::wxDataFormat(const wxDataFormat&)'
is deprecated because 'wxDataFormat' has user-provided
'wxDataFormat& wxDataFormat::operator=(const wxDataFormat&)'.
Add option --with-dpi=[none,system,per-monitor] to configure the dpi awareness
on Windows.
Support DPI Awareness in makefile.gcc and makefile.bcc.
The default DPI awareness is set to per-monitor.
For VS solutions, the DPI aware manifest is added as additional manifest.
For makefiles, the DPI aware manifest is included via the resource file.
Set the default DPI Awareness to per-monitor.
First two paramaters of ctors of wxPGProperty and its derivates are named
'label' and 'name' so wxDirProperty ctor should conform to this convention.
Close#18547.
They prevent fuzzing from working properly as the program aborts instead
of continuing and crashing if it mishandles incorrect input, so just
remove them -- they didn't add any safety anyhow, as asserts are dormant
by default in release builds.
If the popup menu position was explicitly specified, it wasn't taken
into account correctly in wxGTK code as it always clamped it to the
primary display boundaries, even if the window showing the menu wasn't
on this monitor at all, typically resulting in the menu shown at the
left or right edge of the monitor instead of the correct position.
Fix this by using the display containing the window instead. This
requires passing the window, or rather the menu from which it can be
retrieved, to wxPopupMenuPositionCallback too, so add a helper struct to
pass both the position and the menu to it.
Closes https://github.com/wxWidgets/wxWidgets/pull/1621
We don't provide binaries for this compiler any more, just MinGW-w64.
Also mention that SJLJ exceptions propagation mechanism is only used in
32-bit builds.
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.
Also a header for the next version to the change log.
This results in the toolbar being too small to show any items in it
in wxGTK and wxOSX, because the parent window size is still the default
small one and not the actual size it will be when shown, when the size
of the toolbar is first set.
And it seems completely unnecessary to do this anyhow, as toolbar is
resized by wxAuiManager in any case.
Closes#18218.
Calling wxSocket::Accept() may return an invalid socket, especially when
non-blocking, so don't close it unconditionally.
This avoids an assertion failure in MSVC CRT due to calling
closesocket() with an invalid argument.
Carbon is not supported any more and defining m_overlayWindow, which was
only used by Carbon code, resulted in "unused private variable" warning
from clang.
This should be less important now that we don't rely on CanFocus() to
determine if we should set focus to the window any longer, but it seems
to still be better to try to make it work better for hidden windows, so
at least return true from it when full keyboard access is on.
When it's off, the behaviour is the same as before, but this doesn't
affect wxTextCtrl, whose peer NSView overrides CanFocus() to always
return true.
We almost certainly need to override CanFocus() in other views, notably
wxDataViewCtrl, wxSearchCtrl, and any other controls that can have focus
even when full keyboard access is off.
See #17340.
Previously calls to SetFocus() during construction/initialization of the
parent window simply didn't do anything for windows other than
wxTextCtrl because CanFocus() always returned false for them because
they were not shown yet (while wxTextCtrl implementation overrides
CanFocus() to always return true, probably to work around the same
problem).
Now use [NSView setInitialFirstResponder:] if the window is currently
hidden to try to focus it when it's shown. This might still fail if the
window is really not focusable (e.g. for non-text windows when full
keyboard access is off), but it's not worse than what happens now, and
it also may work -- unlike now.
Closes#17340.
This is partially a workaround for AcceptsFocus() not working as
expected for hidden windows under Mac (see the upcoming commits), but
also makes sense on its own: the other ports don't check whether the
window accepts focus in their SetFocus() implementation and it's not
clear why should Mac do this.
See #17340.
We can't handle the accelerators (known as "key equivalents" in Cocoa)
in this function because it is called for the views in top to bottom
order, while wx semantics is for accelerators to be handled in the
accelerator table closest to the focused window.
So just remove this code and rely on accelerator handling happening in
wxWindowMac::OSXHandleKeyEvent() instead.
Closes#13937.
This is not relevant any longer, all supported macOS versions support
x86-64 binaries and the latest ones don't support anything else, so
there is no need to create i386 binaries any more (and PPC ones don't
work since ages).
Don't explain how to install the library first only to say that it
shouldn't be done afterwards.
Also separate the discussion of installing and distributing the
libraries.
Closes#16316.
Don't do anything when the art provider is being reset during the window
destruction: this is at best useless and is actually harmful as the code
ended up by requesting the DPI of the TLW parent which could already be
half-destroyed.
Remove caching of whether any of the children accept focus in
wxControlContainer as it can change at any moment under Mac, due to full
keyboard access being turned on and off (which can be done using
Ctrl-F7, i.e. easily, and so this might be something users actually do
and not just a theoretical edge case). This also incidentally fixes
caching of the wrong focusability state during window initialization,
when its children are not yet shown, as [NSView canBecomeKeyView:] used
for AcceptsFocusFromKeyboard() implementation under Mac, apparently
always returns false for hidden windows.
The behaviour under the other platforms should remain the same, but
AcceptsFocus() is slower now as it always has to query children instead
of being able to avoid doing it when we know that none of them accepts
focus anyhow. OTOH this only happens to the windows that don't accept
focus themselves and, at least at some moment, don't have any children
accepting focus neither, which should be quite rare and optimizing this
case doesn't seem to be worth the extra code complexity due to extra
preprocessor platform checks.
Closes#18089.
The radio box is just a static box and so can't have focus, only its
child radio buttons should have it.
This resolves the problem with getting stuck on wxRadioBox when full
keyboard access is off, as wxControlContainer code tried to give focus
to wxRadioBox because its AcceptsFocusFromKeyboard() returned true, but
none of its radio buttons could be focused without full keyboard access.
However this introduces a new problem with wxRadioBox being skipped when
full keyboard access is on, which will be fixed in the following commit.
See #18089.