It was impossible to give focus to the actual web view in wxWebViewEdge
by keyboard navigation or programmatically with wxWebViewEdge::SetFocus().
Fix it by calling CoreWebView2Controller::MoveFocus() in the wxWebViewEdge's
wxEVT_SET_FOCUS handler.
Closes https://github.com/wxWidgets/wxWidgets/pull/2444
We accidentally ended up with two functions doing the same thing, since
DoGetBorderSize() was added in 743b426605 (Added DoGetClientBestSize()
and use it for a couple of controls in wxMSW., 2009-06-22), as we
already had GetWindowBorderSize() added even earlier in 333d70525c
(added wxWindow::GetWindowBorderSize(), 2006-11-25), so remove the
redundant non-public function and use GetWindowBorderSize() everywhere.
This does change the behaviour of GetWindowBorderSize() in wxMSW, wxGTK
and wxUniv, as it now does what DoGetBorderSize() used to do, but this
should be an improvement, as DoGetBorderSize() implementation was more
precise.
Make configure behaviour consistent with CMake the default value of 0
for wxUSE_LIBLZMA in setup.h under MSW.
This also means that dependency on the system liblzma is not picked up
by default when --disable-sys-libs configure option is used, as this was
rather unexpected.
This function was broken when it was called for a window which was not
the window the sizer was associated with since the recent (pre-3.1.5)
changes trying to work around the problem with the initial windows size
when using GTK 3, see 9c0a8be1dc (Merge branch 'gtk-initial-size',
2021-04-13).
Fix it by passing the sizer to use for calculating the size explicitly
to WXSetInitialFittingClientSize() when we have it, and only falling
back on the window's own sizer if we don't.
Closes#19170.
For macOS < 10.13 there is not available any method to really reset
the clipping region so ResetClip() is implemented using hack that
works for sure only if no graphics state was stored before on the stack
with PushState(). If ResetClip() is called when some graphics states
are already stored with PushState() we can only warn that resetting the clip
may be not effective.
See #19231.
To avoid restoring graphics state from the empty stack. This
could also help in diagnosing potential problems with unbalanced
PushState()/PopState() calls.
Try excluding RichTextCtrlTestCase in the CI build using ASAN, as the
test can still be killed while running the Table sub-test of this test
case even when running only a subset of all tests, so try skipping this
one instead.
Apparently setting focus doesn't work until a mouse click is simulated
to bring up the main test window to the front. This happened implicitly
when running the full test suite, due to e.g. doing it in wxButton unit
tests, which come before wxComboBox::ProcessEnter test, but not when
running just this test (or wxTextCtrl::ProcessEnter) on its own.
Make the test self-contained by simulating a mouse click before
simulating pressing "Enter".
Running this test on its own doesn't work currently, so run
ButtonTestCase, which uses wxUIActionSimulator::Click(), which somehow
fixes the problem in ProcessEnter test (by giving focus to the correct
window, probably), before it to avoid failures in this test now that we
run "wx*" tests separately.
It seems like running the full test suite runs out of memory, as the
test is simply killed, without any more details, after running a certain
number of tests.
Split the tests into 2 parts and run them separately to work around this
problem.
We shouldn't call wxDCImpl::DoGetClippingRect() from
wxGCDCImpl::DoGetClippingRect() because it wouldn't return the correct
result if there is an affine transformation applied to this DC,
as wxDCImpl is not aware of such transformations.
We need to take into account all aplied transformations (including affine
transformations set with SetTransformMatrix()) while resetting clipping
box to its initial size.
We cannot assume that axis-aligned clipping box in local coordinates will
remain axis-aligned box in device coordinates so we need to take into
account all 4 corners of the clipping rectangle to create a polygonal
clipping region in device space.
Closes#19228.
Rename a local variable to avoid clashing with the same name in an outer
scope, fixing a warning introduced in f41564a3e2 (Add
wxRegEx::ConvertFromBasic() helper, 2021-06-18).
Restore the use of c_str() replaced with wx_str() in 4dd77dabe8 (Check
for WXREGEX_CONVERT_TO_MB when calling regcomp() too, 2021-07-16), as
it's still necessary when wxUSE_UNICODE_UTF8==1.
Simplify wxComboCtrl code by always using wxPopupTransientWindow if it's
available instead of various platform-specific workarounds that
shouldn't be needed any longer.
See https://github.com/wxWidgets/wxWidgets/pull/2423
Make code more consistent by using the same approach as in the other
places where conversion is necessary in some builds and define temporary
variables for clarity.
Also use wx_str() when the conversion is not necessary rather than
c_str() as this is more efficient and allows to address an existing
FIXME comment.
Define wx_regexec() wrapper so that we can just drop the length if it's
not supported in one place, instead of having to use this ugly macro in
several places.
No real changes.
When using system regex functions in Unicode build, convert to UTF-8 and
not the current locale encoding, as this should work just as well if the
conversion doesn't fail and even better if it would fail when converting
to the current locale encoding because conversion to UTF-8 never does.