Check for Windows 10 was implemented as check for version 6.4 but the final
version of Windows 10 actually returns 10.0.
(this is a backport of c87c432033)
g++ 4.9.2 added support of __has_include() but, unlike clang, refuses to
compile the <type_traits> header that is detected as existing now in C++98
mode, so the build was broken with it when not using configure (i.e. under
MSW).
Fix this by, first, testing for C++11 compilers separately (which seems like a
good idea anyhow as it will allow using these headers with other compilers)
and, second, not trusting g++ __has_include() for C++11 headers in C++98 mode.
The flicker was only visible under Windows XP or when using a class theme
and was due to mis-positioning the status bar initially in PositionStatusBar().
Fix this by adjusting its position by the toolbar offset before calling its
SetSize().
Closes#16705.
(this is a backport of 8d12e07453 from master)
The expected result in this case is ".", but the filename became empty instead
when wxPATH_NATIVE was used.
Fix this by examining GetFormat(format), which takes care of mapping
wxPATH_NATIVE to its real value, instead of wxPATH_NATIVE itself.
Also add a unit test verifying that this works as expected.
Closes#17010.
Use GetRowHeight()/GetColWidth() instead of accessing m_rowHeights/m_colWidths
arrays directly as the functions handle the hidden rows/columns correctly.
This fixes bug with corruption of wxGrid appearance if any rows/columns were
inserted into or deleted from a grid containing some hidden rows/columns.
Closes#16980.
Handlers for this event expect to get wxSpinEvent but wxMSW and wxGTK1 sent an
object of base wxCommandEvent class which resulted in invalid memory access in
the handlers when using the derived class methods such as Veto().
See #16948.
Allocate our own exclusive copy of the data before modifying it, otherwise
calling ClearAlpha() would clear alpha not only for the image it was called on
but also for all the other images sharing data with it.
Don't mix signed/unsigned integers in arithmetic operations when normalizing
wxDC scale factors: variable holding GCD value should be of the same type as
variables holding devExt and logExt to avoid wrong results of /= operation
when dividend is a negative value.
Closes#16908.
This is useless at best and resulted in GTK+ warnings because we ended up
(somehow -- is there another bug lurking here?) with negative items height in
this case.
Closes#16862.
When the TZ offset specified in the RFC 822 string was equal to the local TZ
offset but the date fell in the DST period, the result was one hour off.
Fix this by converting the date to the UTC explicitly, and then converting it
back to the local TZ to ensure that the DST is taken into effect.
See #15370.
This was broken due to a wrong cast from WPARAM (i.e. 32 bit unsigned int in
Win32) value containing the ID to WORD (i.e. 16 bit unsigned short) which
truncated the ID value.
Notice that MSDN documents the requirement for the IDs to be positive, but
negative IDs seem to work, at least with Windows 7, after this fix.
Closes#16880.
This avoids failing to set the host name if the system /etc/hosts file has any
host names that wouldn't fit in our buffer: at least under Linux/glibc,
gethostname_r() returns error if any such names exist even if we don't ask for
them.
Closes#16641.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use GET_{X,Y}_LPARAM() to extract them from the event position, which handle
negative coordinates (and coordinates can perfectly well be negative when
using multiple displays) correctly, unlike {LO,HI}WORD().
Closes#16812.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Second click can result in a double click event instead of the usual simple
click if it happens quickly enough after the first one, so handle double
clicks in the same way as simple clicks instead of ignoring them.
Closes#16551.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The cached widths need to be invalidated whenever an item is expanded or
collapsed, whether it's done programmatically (which was already handled) or
interactively by the user (which wasn't).
Closes#16678.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The text control was left empty if the string value was not specified, but
it should use the numeric initial value instead in this case.
This notably affected wxSpinCtrlDouble under non-GTK platforms.
Closes#16621.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Creating the status bar before the menu bar but associating it with the frame
after creating the menu bar resulted in a status bar of completely wrong height.
Fix this by enforcing the default height on the status bar when it's attached
to the frame.
Closes#10956.
[This is the backport of r76417 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ended up being broken due to an interplay between different unrelated
changes (at least r15120 and r41134) which were both correct, but didn't work
well together and resulted in not only preventing IsDialogMessage() from
handling ESC, but also our own accelerator tables.
Fix this by doing the check for IsDialogMessage() brokenness in
MSWProcessMessage() itself, just before calling it, instead of doing it in
MSWShouldPreProcessMessage() which is (and must be) called before
MSWTranslateMessage() which checks for accelerators using ESC.
Closes#3813.
[This is the backport of r77071 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use mask and alpha together, this results in visual artefacts and masks
are unnecessary with RGBA bitmaps anyhow.
The only potentially problematic remaining case is mixing bitmaps with alpha
and mask inside the same image list (as we need to indicate whether we use the
mask or not when creating it), but this should probably be rare and in the
meanwhile we can at least RGBA bitmaps with image lists, which includes doing
this implicitly when they are used as button bitmaps.
Also refactor wxBitmap code to extract part of CopyFromIconOrCursor() to allow
reusing it in the newly added MSWUpdateAlpha().
See #11476.
[This is the backport of r75567 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Override DoGetBestClientSize() instead of DoGetBestSize(), as we're really
computing just the size of our contents and like this we don't need to hard
code platform-dependent border sizes in this control itself.
Also use the client size in LayoutControls() for the same reason. This also
makes it unnecessary to pass it the width and height as it can find them on
its own. And x and y were never used in the first place, so remove them too.
Finally, center the bitmaps vertically.
Closes#16422.
[This is the backport of r77083 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use position, not the ID, to find the native menu items to allow the code in
wxMenuItem::SetItemLabel() and DoSetBitmap() to also work with submenus and
not just the normal items.
Closes#16246.
[This is the backport of r76676 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775