From 6645358d86f35520cd73aeb25d532c3f59d29624 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Thu, 14 Nov 2013 23:03:54 +0000 Subject: [PATCH] (svn r26001) -Fix [FS#5795a] (r25686): [OSX] Clear any pending marked characters from an edit box losing focus. --- src/console_gui.cpp | 1 + src/video/cocoa/cocoa_v.mm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/console_gui.cpp b/src/console_gui.cpp index 887dfda60c..c3dcdaa122 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -185,6 +185,7 @@ struct IConsoleWindow : Window ~IConsoleWindow() { _iconsole_mode = ICONSOLE_CLOSED; + _video_driver->EditBoxLostFocus(); } /** diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index afb37bd393..a9f3981d1d 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -579,6 +579,8 @@ void VideoDriver_Cocoa::EditBoxLostFocus() [ [ NSInputManager currentInputManager ] markedTextAbandoned:_cocoa_subdriver->cocoaview ]; } } + /* Clear any marked string from the current edit box. */ + HandleTextInput(NULL, true); } /**