diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m index d70d15ce1c6..3e80b5a6cf3 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m @@ -1335,7 +1335,7 @@ JNF_CLASS_CACHE(jc_CInputMethod, "sun/lwawt/macosx/CInputMethod"); NSTextInputContext *curContxt = [NSTextInputContext currentInputContext]; kbdLayout = curContxt.selectedKeyboardInputSource; - [[NSNotificationCenter defaultCenter] addObserver:self + [[NSNotificationCenter defaultCenter] addObserver:[AWTView class] selector:@selector(keyboardInputSourceChanged:) name:NSTextInputContextKeyboardSelectionDidChangeNotification object:nil];