diff --git a/gdk/macos/gdkmacosglcontext.c b/gdk/macos/gdkmacosglcontext.c index b785beadc0..e4ef4abcb1 100644 --- a/gdk/macos/gdkmacosglcontext.c +++ b/gdk/macos/gdkmacosglcontext.c @@ -145,6 +145,7 @@ ensure_gl_view (GdkMacosGLContext *self) [nsview setPostsFrameChangedNotifications: YES]; [nsview setNeedsDisplay:YES]; [nswindow setContentView:nsview]; + [nswindow makeFirstResponder:nsview]; [nsview release]; if (self->dummy_view != NULL) diff --git a/gtk/gtkimcontextquartz.c b/gtk/gtkimcontextquartz.c index 8b204222f2..62ca2c4e56 100644 --- a/gtk/gtkimcontextquartz.c +++ b/gtk/gtkimcontextquartz.c @@ -239,8 +239,7 @@ discard_preedit (GtkIMContext *context) /* reset any partial input for this NSView */ [(GdkMacosBaseView *)nsview unmarkText]; - NSInputManager *currentInputManager = [NSInputManager currentInputManager]; - [currentInputManager markedTextAbandoned:nsview]; + [[NSTextInputContext currentInputContext] discardMarkedText]; if (qc->preedit_str && strlen (qc->preedit_str) > 0) {