From 755d414bfa71ce4f6e69afcff5402784ad6bff9b Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 11 Dec 2015 17:43:52 +1100 Subject: Bug [#1669]. Prevent crash when clicking on autocompletion list. This appears to be a focus problem. Clicking on the list sets it as the focus which removes focus from the Scintilla text window. Scintilla responds to loss of focus by destroying any popups including the autocompletion list which is not in a state where it is safe to be destroyed. Adding the WindowDoesNotAcceptFocus flag to the list prevents it from getting focus and thus prevents the crash. --- qt/ScintillaEditBase/PlatQt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt/ScintillaEditBase/PlatQt.cpp') diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp index a31473948..d97414198 100644 --- a/qt/ScintillaEditBase/PlatQt.cpp +++ b/qt/ScintillaEditBase/PlatQt.cpp @@ -819,7 +819,8 @@ void ListBoxImpl::Create(Window &parent, #if defined(Q_OS_WIN) // On Windows, Qt::ToolTip causes a crash when the list is clicked on // so Qt::Tool is used. - list->setParent(0, Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); + list->setParent(0, Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | + Qt::WindowDoesNotAcceptFocus); #else // On OS X, Qt::Tool takes focus so main window loses focus so // keyboard stops working. Qt::ToolTip works but its only really -- cgit v1.2.3