wxGetKeyState() does not currently work on non-X11 GTK backends, and in some
cases it has been reported to crash. It seems that the most likely use case
for wxGetKeyState() is to query the modifier keys, so on non-X11 backends, use
GTK+ calls to retrieve the modifier key state.
Non-modifier keys are not currently implemented, update the documentation to
mention this.
Closes https://github.com/wxWidgets/wxWidgets/pull/322
(this is a combined backport of 1033fb048d,
9f9c09e24a and
a18fe083cc from master)
This allows running with a GTK+ library that was built with different backends
than the one wxWidgets was built with. Since GTK3 provides no way to determine
the backends available at run-time, avoid referencing symbols in the backends
by checking the type name of the GdkDisplay, on the assumption that they are
unlikely to ever be changed. The X11 backend is still required at run-time if
it was available at build-time, although this dependency could also be removed.
(cherry picked from commit 1ba59a410f)
Check if copying file actually succeeded, any IO errors that could happen in
it were previously just completely ignored.
See #17638.
(cherry picked from commit a93dcc531c)
Width and height were exchanged in the loops, so the conversion code didn't
work correctly and overflowed the pixel buffer (due to extra padding in the
row stride) for non-square bitmaps. It also resulted in a completely wrong
bitmap appearance, but somehow this managed to go unnoticed, unlike the memory
errors.
See #17633.
(cherry picked from commit f9740e8180)
Fix assert failures when reporting errors in config files under 64 bit systems
where "%d" can't be used to output a "size_t" value.
See #17630.
(cherry picked from commit 75e254fce7)
Use pango_font_description_copy() to make a lossless copy of the original font
instead of doing it using wxWidgets API which is less direct and, in addition,
currently is completely broken as SetXXX() methods don't create the Pango font
description if it doesn't exist as they ought to.
See https://github.com/wxWidgets/wxWidgets/pull/312
(cherry picked from commit dbe2a1c2fd)
In a wxFontEnumerator, if false is returned from OnFacename() or
OnFontEncoding(), the enumeration is supposed to stop. This was not happening
on wxGTK.
See https://github.com/wxWidgets/wxWidgets/pull/311
(cherry picked from commit 3572c2c654)
Only use TBSTYLE_AUTOSIZE, adjusting each button to the size it really needs,
for the toolbars with wxTB_HORZ_LAYOUT style as they don't have any uniform
button size anyhow.
(cherry picked from commit 967bdbf994)
In cfe9625a0d the free function
MSWShouldBeChecked was introduced in toolbar.cpp and mistakenly made
inline. Fix by making it static instead.
(cherry picked from commit 54e6f6e7b8)
Tools containing controls should be enabled/disabled in a different way from
the button tools in wxToolBar::DoEnableTool(). The control and its label (if
any) need to be explicitly enabled/disabled for wxToolBarBase::EnableTool() to
work properly.
Closes#17346.
(cherry picked from commit 68eae6ba5b)
Windows doesn't use the correct image for checked disabled tools, at least
up to and including Windows 7, so don't put such tools in the "checked"
state at all: this doesn't matter as they are disabled anyhow, but shows
the correct image for them.
See #12989.
(cherry picked from commit 29cd13cc8f)
Don't exclude non-MSW specific files any longer from the generated
installer for MSW. The space savings are hardly worth the effort:
originally 46.9 MiB (133 MiB installed) and with all files included 48 MiB
(142 MiB installed).
Also by having all files in the installer more exotic builds such as wxGTK
for MSW are available.
(cherry picked from commit 9a9a1199d4)
Correct the search to completely match the full header name and not only
its beginning by appending ": " to the specified search string.
This prevents GetHeaderValue("Language") from returning "eam: wxWidgets team"
if there is a "Language-Team" header in the catalog, for example.
See #17555.
(cherry picked from commit 889cbd8e04)
This was broken by the changes of
f0e67ed517, see #16402.
Just check that we do have the attributes before examining them.
(cherry picked from commit 74421a7f35)
On OS X at least, the user is free to customize numbers formatting rules
and use more than one character for separators. Don’t assert in such
cases (the rules are untrusted input), but instead fall back to
something reasonable, as is already done if we can’t retrieve the rules.
(cherry picked from commit 5d2b2b3d7a)
This function is not present in older MinGW import libraries, up to at least
MinGW 4.8.1, so we can't use it directly as it was done in
22f0801 and we need to load it dynamically.
(limited backport from commit d55e4b2829b44a07f7c224f7b3327a1267c27093)
A GTK+ bug involving GtkHandleBox somehow prevents drawing of its child
since 3.19.7. Avoid this by disabling the docking functionality, which
is preferable to having the bar be blank.
See #17539
(cherry picked from commit 7e41ac405f)
This merges a branch with a (slightly tweaked to apply) copy of the
cve-2016-0718-fix-2-2-1 branch from the official Expat repository at
https://sourceforge.net/p/expat/code_git/
(cherry picked from 5817911863 in master)
Selecting a leaf node in a wxDataViewCtrl and then pressing the right arrow
key resulted in using an out-of-bounds index for accessing the columns list.
Fix this by setting the current column to the first one, and not to the second
one which might not exist.
See #17537.
(cherry picked from commit 5d671d8136)
std::isnan() is always available when using C++11, so just use it.
Also pout the test for C++11 implementations of both wxIsNaN() and wxFinite()
first, eventually the rest of the checks will become obsolete and will be
removed.
See https://github.com/wxWidgets/wxWidgets/pull/283
(cherry picked from commit bc41cbeb25)
When using the keyboard to select an item by typing the first characters of
its name, we need to make the item visible in addition to selecting it.
See #16336.
(cherry picked from commit 306597c4fa)