diff options
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | qt/ScintillaEditBase/ScintillaEditBase.cpp | 8 | ||||
-rw-r--r-- | qt/ScintillaEditBase/ScintillaEditBase.h | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 0cf3d09cb..7810ec157 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -589,6 +589,10 @@ instead of inserting text. </li> <li> + On Qt, focus changes send the focusChanged signal. + <a href="http://sourceforge.net/p/scintilla/bugs/1957/">Bug #1957</a>. + </li> + <li> On Qt, mouse tracking is reenabled when the window is reshown. <a href="http://sourceforge.net/p/scintilla/bugs/1948/">Bug #1948</a>. </li> diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp index bfd9ddd14..64166e78a 100644 --- a/qt/ScintillaEditBase/ScintillaEditBase.cpp +++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp @@ -788,6 +788,14 @@ void ScintillaEditBase::notifyParent(SCNotification scn) emit autoCompleteCancelled(); break; + case SCN_FOCUSIN: + emit focusChanged(true); + break; + + case SCN_FOCUSOUT: + emit focusChanged(false); + break; + default: return; } diff --git a/qt/ScintillaEditBase/ScintillaEditBase.h b/qt/ScintillaEditBase/ScintillaEditBase.h index 257c06a34..8685f080f 100644 --- a/qt/ScintillaEditBase/ScintillaEditBase.h +++ b/qt/ScintillaEditBase/ScintillaEditBase.h @@ -104,6 +104,7 @@ signals: void callTipClick(); void autoCompleteSelection(int position, const QString &text); void autoCompleteCancelled(); + void focusChanged(bool focused); // Base notifications for compatibility with other Scintilla implementations void notify(SCNotification *pscn); |