Merge branch 'macos-input-method' into 'master'

fix: make input method work again in gtk4

Closes #3968

See merge request GNOME/gtk!3668
This commit is contained in:
Matthias Clasen 2021-06-14 19:20:06 +00:00
commit a6b4e53dca
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)
{