Add WX_GL_CORE_PROFILE and WX_GL_{MAJOR,MINOR}_VERSION attributes which can be
used to use modern OpenGL with wxGLCanvas.
See #16402.
(this is a backport of 3c7ba39135 from master)
Don't leave the variable uninitialized, even though it's not totally obvious
which value should it have for wxFontRefData objects created from native
fonts, using "true" seems more appropriate and is definitely better than not
initializing the field at all.
(this is a backport of 2f1e8c5402 from master)
On wxGTK, wxFileDataObject::SetData calls g_filename_from_uri which
percent-decodes URIs. No corresponding percent-encoding was done in
wxFileDataObject::GetDataSize/GetDataHere. Use g_filename_to_uri instead in so
that filenames are properly escaped.
This commit also fixes the data being truncated if it contains non-ASCII
characters on wide-character builds, see the memcpy arguments in the original
code.
On OS X (tested on 10.10.5) calls to window.open() with a different target
than _self were simply ignored. No navigation and no EVT_WEBVIEW_NEWWINDOW as
expected.
Unfortunately WebKit does not call the decidePolicyForNewWindowAction delegate
method in these cases. A new delegate method createWebViewWithRequest has been
implemented to handle this case and send EVT_WEBVIEW_NEWWINDOW as in other
ports.
Closes https://github.com/wxWidgets/wxWidgets/pull/86
(cherry picked from commit e6b31adefe)
When using Whole Program Optimization, pItem->OnDrawItem() incorrectly calls the
base class wxOwnerDrawn::OnDrawItem() instead of the appropriate override, for
example wxCheckListBoxItem::OnDrawItem(). The problem can be avoided by not
using an unnecessary cast to wxListBoxItem*.
(cherry picked from commit 5905857dba)
Deleting a tool from its own event handler resulted in at least in an assert
and could also lead to a crash as an already deallocated pointer was
dereferenced.
Fix this by checking if the tool with the same ID is still available after the
event handler finishes.
Closes#16762.
(this is a backport of faffaaae29 from master)
Use setDrawsBackground: to fix the background colour and adjust the text
colour whenever the control is enabled or disabled.
Closes#16807.
(this is a backport of 9bedba0bf3 from master)
This makes top and left borders for the controls inside the box the same as
right and bottom ones.
Closes#16808.
(this is a backport of bd177b0635 from master)
Explicitly disable rich text content and automatic quotation marks replacement
in normal multiline text controls to make them behave closer to single line
ones and also multiline ones on other platforms.
Closes#16805.
(this is a backport of 262ed2c133 and
3465d659fee0313a6dc650074432c3c435e4a83e from master)
For such controls (e.g. wxButton, wxChoice, wxGauge), their initial position
was different from the one specified when creating them, even though calling
SetPosition() later did position them at exactly the position passed as
argument.
Closes#16780.
(this is a backport of a4681572cc from master)
Controls with wxTE_PASSWORD style didn't send wxEVT_TEXT_ENTER even if they
also had wxTE_PROCESS_ENTER. Fix this by checking for the latter style before
mapping the enter presses to default button activation.
Closes#14930.
(this is a backport of 8e0799e3e5 from master)
Contrary to an old comment, using it seems to work, while using
secondarySelectedControlColor results in incorrect appearance, different from
the other disabled controls and, worse, makes the labels unreadable as their
colour is too close to that of the background inside nested panels.
Closes#10524.
(this is a backport of c269398588 and
e7327959e06ae051a85622cbde9d0a6b7b1fba53 from master)
Pressing it results in a control action with an empty, but not null, string.
Recognize it correctly.
Closes#16869.
(this is a backport of 7065e26fb3 from master)
This allows to properly detected numeric keypad "Enter" key in the code,
notably in wxTextCtrl inside wxWidgets itself.
Closes#16415.
(this is a backport of 4f69410cd8 from master)
Do set from and to pages if we're not asking the user to choose them,
otherwise nothing is printed at all.
Closes#16294.
(this is a backport of 896e148da5 from master)
If creating a sound object fails, delete it to ensure that it is recreated
later.
This fixes a minor bug: previously, if an invalid file was used as sound file,
only the first attempt to play it resulted in an error and all the subsequent
ones were just silently ignored. Now every attempt to play an invalid file
results in an error message, as expected.
(this is a backport of a788351eb6 from master)
Don't define a variable which is used exactly once, testing for the async flag
directly is just as, or even more, readable and shorter.
(this is a backport of 605149ed07 from master)
Don't pretend that we created wxSound object successfully without actually
doing it: this means that now passing an invalid (e.g. non-existent or using
wrong format) file to wxSound::Create()/ctor will return false/result in
IsOk() returning false later, just as in the other ports.
It also means that playing a successfully created wxSound object won't give
any error messages, as unexpectedly happened before.
(this is a backport of a6a3ad0d66 from master)
Don't assume that we can open any file as a sound, check for the return value
from AudioServicesCreateSystemSoundID().
(this is a backport of ba4d3d31a6 from master)
Implement workaround in UMAGetSystemVersion() function which produced the following
warning on the console for every application launch on OS X 10.10+:
WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.5 instead
of 10.10.5. Use NSProcessInfo's operatingSystemVersion property to get correct
system version number.*
Workaround for 3.0 branch instead of correct implementation in commit 658eca2896
2dd407609b uses wxGetTopLevelGDK() only
available in master and not in 3.0 branch, avoid it by just using the default
screen (which also avoids having to add another GTK+ version check for
gdk_window_get_screen() which is only available since 2.24).
For some reason the implementation of this method (see #12754) also put the
image on the clipboard, which was completely unexpected and unnecessary, so
just don't do it.
Closes https://github.com/wxWidgets/wxWidgets/pull/77
(cherry picked from commit 10a4d15b27)
Some native controls don't take kindly to being set setStringValue: with
a value invalid for the control (such as empty string for
NSPathControl). Don't do this if the label is empty anyway to avoid
problems with wxNativeWindow when the underlying native control is like
that.
(This is backport of db9baf9 from master)
Undo the change introduced, probably accidentally, by r11369 (12 years ago)
and skip the default handling of all events except wxEVT_SIZE and wxEVT_PAINT,
which are special for the reasons explained in the comments in the code, if
the user code has already handled the event.
This allows to customize scrolling by selectively handling some scrolling
events only and generally makes sense.
Closes#15684.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
(cherry picked from commit de54520c95)
Outlined rectangles are one pixel larger with vector-based drawing,
adjust them to get consistent behavior.
Ellipses do not appear to need adjustment.
See #17091
(cherry picked from commit 4623c5ad9c)