This results in a noticeable delay when using wxGTK via a remote X11
connection for every key event as a round trip to server is needed to get the
mouse pointer position every time a key is pressed or released.
Only provide the position on demand. And explain that it's actually not very
useful as it's simply the same as the current mouse position.
Closes#14361.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes "make DESTDIR=..." Broken by r71050 but still allows "make
DESTDIR=... install" to work even under MinGW where "ln -s" is mapped to "cp"
and so doesn't work with non-existing first argument.
Closes#14517.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows Scroll{Lines,Pages}() methods inherited from wxWindow to work with
it.
Add a test of using them to the sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just make it possible to reuse the scrolled window and
scrollbars creation code from derived classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead, have two public non-virtual SetPage() methods forwarding to a private
DoSetPage(), as usual.
This avoids the need for "using wxWebView::SetPage" which is needed to avoid
warnings about hiding the other base class virtual when implementing one of
them and which was forgotten in wxMSW version resulting in warnings when using
g++ to compile it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The "loaded" flag was never set to true, so we kept reloading the DLL on every
callback.
Do set the flag after loading it successfully.
Closes#14512.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fall back to just plain Show() if wxDynamicLibrary, which we use to get
function not existing in all Windows versions, is not available.
Closes#14509.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes compilation of non-wxOSX ports (e.g. wxGTK) under OS X.
Also make the difference between the two symbols more clear in the
documentation.
Closes#14503.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Translate key presses to accelerators before sending wxEVT_KEY_DOWN.
Also check for accelerators even for the key combinations handled by IM,
normally IM should take precedence but IM seems to intercept common keys such
as Shift+anything which it makes sense to use as accelerators.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Trying to append a menu item with empty label resulted in an assert (at least
under wxGTK but probably elsewhere too), and in any case wasn't very useful,
so use "(untitled)" instead in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We were getting crashes due to using methods of already half-destroyed object
when wxWebView window was destroyed in wxGTK, with the following abbreviated
stack:
#0 wxgtk_webview_webkit_load_status (widget=0x12eb380, webKitCtrl=0x13ee040) at src/gtk/webview_webkit.cpp:38
...
#8 0x00007ffff05ca281 in dispatchDidFailLoad (error=..., this=0x7fffe32db900) at ../Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:1054
#9 WebKit::FrameLoaderClient::dispatchDidFailLoad (this=0x7fffe32db900, error=...) at ../Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:1049
#10 0x00007ffff0b0de54 in WebCore::FrameLoader::checkLoadCompleteForThisFrame (this=0x7fffe3221b70) at ../Source/WebCore/loader/FrameLoader.cpp:2128
#11 0x00007ffff0b0cfde in WebCore::FrameLoader::checkLoadComplete (this=<optimized out>) at ../Source/WebCore/loader/FrameLoader.cpp:2370
#12 0x00007ffff0b0a3b2 in WebCore::FrameLoader::receivedMainResourceError (this=0x7fffe3221b70, error=..., isComplete=true) at ../Source/WebCore/loader/FrameLoader.cpp:2640
#13 0x00007ffff0b423b7 in cancel (error=..., this=0x7fffe3279680) at ../Source/WebCore/loader/ResourceLoader.cpp:399
#14 WebCore::ResourceLoader::cancel (this=0x7fffe3279680, error=...) at ../Source/WebCore/loader/ResourceLoader.cpp:353
#15 0x00007ffff0b420c0 in WebCore::ResourceLoader::cancel (this=<optimized out>) at ../Source/WebCore/loader/ResourceLoader.cpp:350
#16 0x00007ffff0afda9e in WebCore::DocumentLoader::stopLoading (this=0x7fffa081d800) at ../Source/WebCore/loader/DocumentLoader.cpp:258
#17 0x00007ffff0b09561 in stopAllLoaders (clearProvisionalItemPolicy=WebCore::ShouldClearProvisionalItem, this=0x7fffe3221b70) at ../Source/WebCore/loader/FrameLoader.cpp:1523
#18 WebCore::FrameLoader::stopAllLoaders (this=0x7fffe3221b70, clearProvisionalItemPolicy=WebCore::ShouldClearProvisionalItem) at ../Source/WebCore/loader/FrameLoader.cpp:1501
#19 0x00007ffff0b0d17a in WebCore::FrameLoader::stopForUserCancel (this=0x7fffe3221b70, deferCheckLoadComplete=false) at ../Source/WebCore/loader/FrameLoader.cpp:1541
#20 0x00007ffff05f3a36 in webkit_web_view_dispose (object=0x12eb380) at ../Source/WebKit/gtk/webkit/webkitwebview.cpp:1327
#21 0x00007ffff27ff7a0 in g_object_run_dispose (object=0x12eb380) at /tmp/buildd/glib2.0-2.32.3/./gobject/gobject.c:1061
#22 0x00007ffff4476c1e in gtk_scrolled_window_forall (container=0x7fff9c007d10, include_internals=0, callback=0x7ffff452cd20 <IA__gtk_widget_destroy>, callback_data=0x0)
at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkscrolledwindow.c:1085
#23 0x00007ffff439872f in gtk_container_destroy (object=0x7fff9c007d10) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkcontainer.c:1073
...
#28 0x00007ffff443cd60 in gtk_object_dispose (gobject=0x7fff9c007d10) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkobject.c:421
#29 0x00007ffff27ff7a0 in g_object_run_dispose (object=0x7fff9c007d10) at /tmp/buildd/glib2.0-2.32.3/./gobject/gobject.c:1061
#30 0x00007ffff6cb65ac in wxWindow::~wxWindow (this=0x13ee040, __in_chrg=<optimized out>) at src/gtk/window.cpp:2367
#31 0x00007ffff6d71241 in wxControlBase::~wxControlBase (this=0x13ee040, __in_chrg=<optimized out>) at src/common/ctrlcmn.cpp:49
#32 0x00000000005cf761 in wxControl::~wxControl (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/gtk/control.h:27
#33 0x00007ffff7bd1eae in wxWebView::~wxWebView (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/webview.h:96
#34 0x00007ffff7bd3443 in wxWebViewWebKit::~wxWebViewWebKit (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/gtk/webview_webkit.h:26
#35 0x00007ffff7bd34ae in wxWebViewWebKit::~wxWebViewWebKit (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/gtk/webview_webkit.h:26
Fix this by setting m_isBeingDeleted flag for wxWebViewWebKit early and
checking it in the callback.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Setting the frame client size and then calling Centre() on it resulted in the
frame coming up with a wrong client size in wxGTK because the call to Centre()
resulted in calling wxTopLevelWindow::DoSetSize() which unconditionally reset
m_deferShowAllowed to true, undoing setting it to false in DoSetClientSize().
Only reset m_deferShowAllowed if the size was really changed but not if the
window was only moved, as happens when centering it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a workaround for a deeper compatibility problem in Cocoa
implementation (see the bug for detailed discussion), but for now, this
simple workaround is much better than not doing nothing.
See #13888.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Just as in wxMSW, it makes sense to put URLs on clipboard (or drag them) in
both URL-specific and plain text formats to facilitate pasting (or dropping)
them into other applications.
So make wxURLDataObject in wxGTK a composite data object containing both its
old data object and wxTextDataObject.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For some incomprehensible reason, GDK_SELECTION_TYPE_STRING was hard coded for
all non-text formats even though it was clearly never the right format to use.
Use the correct value specified by the format instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The delayed destruction mechanism is not MT-safe, so using it for wxSocket
objects destroyed from threads other than main resulted in crashes. Luckily,
it is not necessary to use it for such sockets anyhow as they don't risk
receiving any events -- which are only dispatched in the main thread -- and so
can be destroyed immediately.
So do destroy them directly instead of just scheduling for later destruction
when wxSocket::Destroy() is called.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775