Skip to content
Permalink
Browse files
8257242: [macOS] Java app crashes while switching input methods
Backport-of: 822ee47459d3a33ab3acd7f8798525967a20d237
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Apr 26, 2021
1 parent 1abb26f commit 59f8941c30fb6111c5e95531d520b4ef03e376c3
@@ -37,9 +37,6 @@

// TODO: NSMenu *contextualMenu;

// Keyboard layout
NSString *kbdLayout;

// dnd support (see AppKit/NSDragging.h, NSDraggingSource/Destination):
CDragSource *_dragSource;
CDropTarget *_dropTarget;
@@ -37,6 +37,9 @@

#import <Carbon/Carbon.h>

// keyboard layout
static NSString *kbdLayout;

@interface AWTView()
@property (retain) CDropTarget *_dropTarget;
@property (retain) CDragSource *_dragSource;
@@ -1010,7 +1013,7 @@ - (void) insertText:(id)aString replacementRange:(NSRange)replacementRange
[self abandonInput];
}

- (void)keyboardInputSourceChanged:(NSNotification *)notification
+ (void)keyboardInputSourceChanged:(NSNotification *)notification
{
#ifdef IM_DEBUG
NSLog(@"keyboardInputSourceChangeNotification received");
@@ -1327,7 +1330,7 @@ - (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
CHECK_EXCEPTION();

#ifdef IM_DEBUG
fprintf(stderr, "characterIndexForPoint returning %ld\n", index);
fprintf(stderr, "characterIndexForPoint returning %d\n", index);
#endif // IM_DEBUG

if (index == -1) {

1 comment on commit 59f8941

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 59f8941 Apr 26, 2021

Please sign in to comment.