X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5791b9983fb52a074500ecbd7e8ef7a14a90b22..446e69bee56ce978cfb87d80a2f8c0e44ec61658:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index cd4b62035b..703ceccd9c 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1817,6 +1817,18 @@ void wxTextCtrl::OnUrlMouseEvent(wxMouseEvent& event) GetEventHandler()->ProcessEvent(url_event); } +bool wxTextCtrl::GTKProcessEvent(wxEvent& event) const +{ + bool rc = wxTextCtrlBase::GTKProcessEvent(event); + + // GtkTextView starts a drag operation when left mouse button is pressed + // and ends it when it is released and if it doesn't get the release event + // the next click on a control results in an assertion failure inside + // gtk_text_view_start_selection_drag() which simply *kills* the program + // without anything we can do about it, so always let GTK+ have this event + return rc && (IsSingleLine() || event.GetEventType() != wxEVT_LEFT_UP); +} + // static wxVisualAttributes wxTextCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))