Calling ReleaseMouse() from wxEVT_MOUSE_CAPTURE_LOST handler could
result in bogus asserts about ReleaseMouse() reentrancy because the
function generating "capture lost" events in wx itself wrongly set the
wxMouseCapture::changing flag, instead of just examining it, as it was
supposed to do.
This corrects a problem introduced back in b0ad1918b9 (No changes, just
use wxRecursionGuard instead of manual boolean flag., 2013-08-18) which,
contrary to the commit message, did change the behaviour by replacing a
simple test with the use of wxRecursionGuard here.
We already disabled the warnings inside windows.h, but since bf5090bcf3
(Enable Winsock 2 and IPv6 build options by default, 2021-04-24) we
could get warnings from winsock2.h, so move its inclusion inside the
region where the warnings were disabled too.
For the record, the warnings were, rather surprisingly, C4668, which is
disabled by default, but apparently was enabled somewhere inside (at
least some versions of) SDK headers.
This commit is best viewed with --color-moved git option.
Fix using PCH with MSVC too, which notably fixes using it with vcpkg.
Closes https://github.com/wxWidgets/wxWidgets/pull/2372
Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
This currently means macOS 10.11 only, which is only used on Travis CI
and Python 2 installation there is broken anyhow, so this doesn't make
anything worse than it already is.
These functions don't need to be members of wxGtkPrintNativeData as they
don't use this object at all, so one shouldn't be required to call them.
And rather than making them static, just make them private functions
instead.
No real changes, this is just a refactoring.
The paper size and orientation in wxPrintData were never updated because
we didn't retrieve them from GTK correctly: they need to be extracted
from "default-page-setup" property and not the main GtkPrintSettings
themselves, at least with GTK 3.
This is necessary in order to get the information entered by the user in
the dialog and was already done in PrintDialog(), but not Print()
itself -- now do it there as well.
No real changes, just make it simpler to do other things before
returning successfully by handling error returns separately.
This is also more consistent with PrintDialog() method of the same
class.
No real changes.
Don't add -l to libraries already containing it (for example -lpthread).
Change libraries with format libName.so or libName.a to -lName,
configure also uses -l for these libraries. Account for possible invalid
libraries (Name-NOTFOUND) which could happen with imported libraries,
for example OpenGL::OpenGL.
Closes https://github.com/wxWidgets/wxWidgets/pull/2359
Right clicking on the column header shouldn't generate context menu
events, but it did because our gtk_dataview_button_press_callback() got
these events for both the "bin" window, containing the items, and the
"header" window.
Fix this by filtering out the events not sent to the right window.
It would be even better to not get these events in the first place, i.e.
somehow not connect to them in the first place, but it's not clear how
to do this, so settle for this solution for now.
For testing this fix, just right click any column in the dataview
sample: previously this generated both messages about the column header
right click and the context menu in wxGTK, while now it only generates
the former, as in the generic version.
This undoes accidental change of ms_classInfo from public to protected
in 95c98a0b5f (Work around -Wuggest-override for event table macros from
gcc 11, 2021-04-25).
Also add a unit test checking that using wxCLASSINFO(wxObject) compiles
and works as expected.
3217a4e8a2 (Fix best size for windows which are hidden when TLW is shown
with GTK3, 2021-04-30) did not account for possibility that window needing
revalidated best size is also the TLW.
See #16088
All BCC makefiles were removed as a part of "Remove support for Borland
C++ compiler" PR; however, a few of them sneaked back as a part of the
newly introduced wxWebRequest.
Remove them for good.
When setting a path including an invalid drive in IFileDialog-based
wxDirDialog, Windows returned ERROR_INVALID_DRIVE error. wxWidgets
treated this as an error and reverted to showing the old
ShowSHBrowseForFolder()-based dialog.
However, it is better to just ignore any errors produced when attempting
to set the default folder (as the code already did for ERROR_FILE_NOT_FOUND)
and show IFileDialog-based dialog anyway.
Closes https://github.com/wxWidgets/wxWidgets/pull/2356
Add more functions for manipulating wxImage colours.
Show using them in the same and add new unit tests for them.
This is a squashed commit of branch 'tomay3000/image-lightness'.
Closes https://github.com/wxWidgets/wxWidgets/pull/2310
Use wxVector<> instead of relying on compiler support for VLAs which is
not standard and shouldn't be required.
This fixes compilation using OpenVMS compiler after the changes of
53bd1391f4 (Add a new wxFileName function to resolve symlinks to
absolute paths, 2021-04-01).
Previously wxLocale object was set as the global local as soon as it was
created, even when the default ctor was used, i.e. the locale wasn't
really changed at all. This was always wrong, but only started to result
in visible problems since the changes of c6d6ec9295 (Merge branch
'msw-fix-decimal-point' of https://github.com/vslavik/wxWidgets,
2021-04-18) as we now could use the existing but not yet active locale
when checking for the decimal separator mismatch, resulting in spurious
asserts.
Fix this by postponing the call to wxSetLocale() and the rest of what
was previously done in the ctor until Init() is called (which is done by
all non default ctors).
Closes https://github.com/wxWidgets/wxWidgets/pull/2350Closes#19154.
This control was removed during the Carbon code removal in commit
5ba67c67e4, so the system option
does nothing now (and was only mentioned in the documentation
and the sample).