aboutsummaryrefslogtreecommitdiff
path: root/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m')
-rw-r--r--src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m18
1 files changed, 11 insertions, 7 deletions
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 0120f04128f..15d2cb17e8c 100644
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
@@ -393,7 +393,7 @@ static void debugPrintNSEvent(NSEvent* event, const char* comment) {
case kVK_End:
// Abandon input to reset IM and unblock input after
// canceling input accented symbols
- [self abandonInput];
+ [self abandonInput:nil];
break;
}
}
@@ -1157,7 +1157,7 @@ static jclass jc_CInputMethod = NULL;
// Abandon input to reset IM and unblock input after entering accented
// symbols
- [self abandonInput];
+ [self abandonInput:nil];
}
+ (void)keyboardInputSourceChanged:(NSNotification *)notification
@@ -1251,7 +1251,11 @@ static jclass jc_CInputMethod = NULL;
}
}
-- (void) unmarkText
+- (void) unmarkText {
+ [self unmarkText:nil];
+}
+
+- (void) unmarkText:(jobject) component
{
#ifdef IM_DEBUG
fprintf(stderr, "AWTView InputMethod Selector Called : [unmarkText]\n");
@@ -1264,8 +1268,8 @@ static jclass jc_CInputMethod = NULL;
// unmarkText cancels any input in progress and commits it to the text field.
JNIEnv *env = [ThreadUtilities getJNIEnv];
GET_CIM_CLASS();
- DECLARE_METHOD(jm_unmarkText, jc_CInputMethod, "unmarkText", "()V");
- (*env)->CallVoidMethod(env, fInputMethodLOCKABLE, jm_unmarkText);
+ DECLARE_METHOD(jm_unmarkText, jc_CInputMethod, "unmarkText", "(Ljava/awt/Component;)V");
+ (*env)->CallVoidMethod(env, fInputMethodLOCKABLE, jm_unmarkText, component);
CHECK_EXCEPTION();
}
@@ -1526,14 +1530,14 @@ static jclass jc_CInputMethod = NULL;
object:nil];
}
-- (void)abandonInput
+- (void)abandonInput:(jobject) component
{
#ifdef IM_DEBUG
fprintf(stderr, "AWTView InputMethod Selector Called : [abandonInput]\n");
#endif // IM_DEBUG
[ThreadUtilities performOnMainThread:@selector(markedTextAbandoned:) on:[NSInputManager currentInputManager] withObject:self waitUntilDone:YES];
- [self unmarkText];
+ [self unmarkText:component];
}
/******************************** END NSTextInputClient Protocol ********************************/