summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2013-11-14 23:03:54 +0000
committermichi_cc <michi_cc@openttd.org>2013-11-14 23:03:54 +0000
commit8ceef6ec61cf82268805cf2a0db5bf6718e344a3 (patch)
treed1cc82454f114eaab37f3b2f324f3343a8b1dc20
parenta31b46ba840f1478666001283200b8176314b1f8 (diff)
downloadopenttd-8ceef6ec61cf82268805cf2a0db5bf6718e344a3.tar.xz
(svn r26001) -Fix [FS#5795a] (r25686): [OSX] Clear any pending marked characters from an edit box losing focus.
-rw-r--r--src/console_gui.cpp1
-rw-r--r--src/video/cocoa/cocoa_v.mm2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/console_gui.cpp b/src/console_gui.cpp
index 887dfda60..c3dcdaa12 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 afb37bd39..a9f3981d1 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);
}
/**