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.
Handle these events in the menu itself first, then the window and only
then at the application level instead of falling back on the application
before searching the window for the handler.
This requires using the logic already present in the base class
DoProcessEvent() method, so make it protected to allow reuse.
Closes#4769.
This is still completely undiscoverable, but slightly better than only
mentioning this in a Stack Overflow answer referencing a comment in the
bug tracker.
Closes#9659.
Size grip in generic wxStatusBar is only supported in wxGTK as it's
drawn using GTK functions, but this is not really a problem as other
platforms either use native implementations (MSW, Qt) or shouldn't show
size grip anyhow as it looks non-native (Mac).
So just ensure we don't leave space for the grip if it's not shown,
correcting the change of 6c1b2b23cf.
Closes#18469.
This renders unnecessary the previous workarounds for using NSOpenGLView
as the base class for wxGLCanvas view, so revert them.
See:
- 2ab430965c which introduced the use of
NSOpenGLView (see https://github.com/wxWidgets/wxWidgets/pull/846).
- ea68934b8e for the first workaround due
to the use of NSOpenGLView and its default context creation.
- 6974a6ceaa for the refinement of the
workaround above.
- e6ae83c386 and
b822e9efe8 which tweaked it futher.
This commit renders unnecessary all the changes since the initial switch
to NSOpenGLView by just preventing NSOpenGLView from creating its own
context and thus enforcing the use of wxGLContext associated with
wxGLCanvas.
Closes https://github.com/wxWidgets/wxWidgets/pull/1617
This can happen when using wxGrid and calling UseNativeColHeader()
before adding any columns and shouldn't be fatal, so simply don't do
anything in this case.