summaryrefslogtreecommitdiff
path: root/src/Fl_cocoa.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_cocoa.mm')
-rw-r--r--src/Fl_cocoa.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index c34099d74..5430db51a 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -2646,6 +2646,13 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
received,strlen([received UTF8String]),Fl::compose_state,replacementRange.location,replacementRange.length);*/
fl_lock_function();
Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ if (fl_mac_os_version >= 101400 && replacementRange.length > 0) {
+ // occurs after a key was pressed and maintained and an auxiliary window appeared
+ // prevents marking dead key from deactivation
+ [[self inputContext] discardMarkedText];
+ }
+#endif
while (replacementRange.length--) { // delete replacementRange.length characters before insertion point
int saved_keysym = Fl::e_keysym;
Fl::e_keysym = FL_BackSpace;