aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.mm
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-06-05 10:13:43 +1000
committernyamatongwe <devnull@localhost>2011-06-05 10:13:43 +1000
commita861c5ef88810df1fbb8efdf22d57e42a787cb4a (patch)
tree3e185a2662a378b47723cf8f945875878c22193f /cocoa/ScintillaCocoa.mm
parent2155836b9fbdd3fdbbe3b016c56dada71a4f023e (diff)
downloadscintilla-mirror-a861c5ef88810df1fbb8efdf22d57e42a787cb4a.tar.gz
Respond to window deactivation by hiding caret.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r--cocoa/ScintillaCocoa.mm25
1 files changed, 12 insertions, 13 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index f97520a81..557861d6b 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1649,19 +1649,18 @@ void ScintillaCocoa::HandleCommand(NSInteger command)
//--------------------------------------------------------------------------------------------------
-//OSStatus ScintillaCocoa::ActiveStateChanged()
-//{
-// // If the window is being deactivated, lose the focus and turn off the ticking
-// if ( ! this->IsActive() ) {
-// DropCaret();
-// //SetFocusState( false );
-// SetTicking( false );
-// } else {
-// ShowCaretAtCurrentPosition();
-// }
-// return noErr;
-//}
-//
+void ScintillaCocoa::ActiveStateChanged(bool isActive)
+{
+ // If the window is being deactivated, lose the focus and turn off the ticking
+ if (!isActive) {
+ DropCaret();
+ //SetFocusState( false );
+ SetTicking( false );
+ } else {
+ ShowCaretAtCurrentPosition();
+ }
+}
+
//--------------------------------------------------------------------------------------------------