[gtk/gtk-3-24: 8/20] Replace NSInputManager for MacOS 10.6 and later.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 8/20] Replace NSInputManager for MacOS 10.6 and later.
- Date: Sat, 8 Dec 2018 19:43:17 +0000 (UTC)
commit 85f52dceaa8ab71c3d00d2518c819a957cae946f
Author: John Ralls <jralls ceridwen us>
Date: Mon Dec 3 21:25:38 2018 +0900
Replace NSInputManager for MacOS 10.6 and later.
gdk/quartz/GdkQuartzView.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c
index 7237363f75..88485fc2c5 100644
--- a/gdk/quartz/GdkQuartzView.c
+++ b/gdk/quartz/GdkQuartzView.c
@@ -17,6 +17,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <AvailabilityMacros.h>
#include "config.h"
#import "GdkQuartzView.h"
#include "gdkquartzwindow.h"
@@ -201,8 +202,12 @@
/* discard invalid text input with Chinese input methods */
str = "";
[self unmarkText];
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
[currentInputManager markedTextAbandoned:self];
+#else
+ [[NSTextInputContext currentInputContext] discardMarkedText];
+#endif
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]