Skip to content

Commit

Permalink
8195675: Call to insertText with single character from custom Input M…
Browse files Browse the repository at this point in the history
…ethod ignored

Reviewed-by: prr
  • Loading branch information
Steven Loomis committed May 28, 2024
1 parent 0f3e2cc commit b8f2ec9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
// keyboard layout
static NSString *kbdLayout;

// Constant for keyman layouts
#define KEYMAN_LAYOUT "keyman"

@interface AWTView()
@property (retain) CDropTarget *_dropTarget;
@property (retain) CDragSource *_dragSource;
Expand Down Expand Up @@ -259,7 +262,7 @@ - (void) scrollWheel: (NSEvent*) event {

- (void) keyDown: (NSEvent *)event {
fProcessingKeystroke = YES;
fKeyEventsNeeded = YES;
fKeyEventsNeeded = ![(NSString *)kbdLayout containsString:@KEYMAN_LAYOUT];

// Allow TSM to look at the event and potentially send back NSTextInputClient messages.
[self interpretKeyEvents:[NSArray arrayWithObject:event]];
Expand Down Expand Up @@ -965,7 +968,7 @@ - (void) insertText:(id)aString replacementRange:(NSRange)replacementRange

if ((utf16Length > 2) ||
((utf8Length > 1) && [self isCodePointInUnicodeBlockNeedingIMEvent:codePoint]) ||
((codePoint == 0x5c) && ([(NSString *)kbdLayout containsString:@"Kotoeri"]))) {
[(NSString *)kbdLayout containsString:@KEYMAN_LAYOUT]) {
#ifdef IM_DEBUG
NSLog(@"string complex ");
#endif
Expand Down

1 comment on commit b8f2ec9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.