diff options
Diffstat (limited to 'indra/llwindow/llopenglview-objc.mm')
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 062577baf8..99c27e79a0 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -8,6 +8,7 @@ #import "llopenglview-objc.h" #include "llwindowmacosx-objc.h" +#import "llappdelegate-objc.h" @implementation NSScreen (PointConversion) @@ -318,6 +319,11 @@ attributedStringInfo getSegments(NSAttributedString *str) uint keycode = [theEvent keyCode]; if (callKeyDown(keycode, mModifiers)) { + if (!mMarkedTextAllowed && [[theEvent characters] characterAtIndex:0] != NSBackspaceCharacter) + { + showInputWindow(true, @""); + [[[(LLAppDelegate*)[NSApp delegate] inputView] inputContext] handleEvent:theEvent]; + } [[self inputContext] handleEvent:theEvent]; } // OS X intentionally does not send us key-up information on cmd-key combinations. @@ -426,8 +432,7 @@ attributedStringInfo getSegments(NSAttributedString *str) mHasMarkedText = TRUE; mMarkedTextLength = [aString length]; mMarkedText = (NSAttributedString*)[aString mutableString]; - } else if ([[aString mutableString] characterAtIndex:0] != NSBackspaceCharacter) { - showInputWindow(true, aString); + } else { if (mHasMarkedText) { [self unmarkText]; |