aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/PlatQt.cpp
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-12-11 17:43:52 +1100
committerNeil <nyamatongwe@gmail.com>2015-12-11 17:43:52 +1100
commit8a5340d1afd77fb42f3aede0f7eef215517fb0b5 (patch)
treefe8921634d0c17def22964effc41ca7663b4e356 /qt/ScintillaEditBase/PlatQt.cpp
parent12c1a6d93c6fe3e93bcebcb23d8ac2e2fe92a5bd (diff)
downloadscintilla-mirror-8a5340d1afd77fb42f3aede0f7eef215517fb0b5.tar.gz
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.
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.cpp')
-rw-r--r--qt/ScintillaEditBase/PlatQt.cpp3
1 files changed, 2 insertions, 1 deletions
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