mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 615935: Cancel any complex text composition for a Cocoa NPAPI plugin when it doesn't return kNPEventStartIME for a key down event. r=smichaud a=blocking2.0betaN+
This commit is contained in:
parent
c04477ac1b
commit
bf92b679ec
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
- (NSTextInputContext*)inputContext;
|
- (NSTextInputContext*)inputContext;
|
||||||
- (BOOL)interpretKeyEvent:(NSEvent*)event string:(NSString**)string;
|
- (BOOL)interpretKeyEvent:(NSEvent*)event string:(NSString**)string;
|
||||||
|
- (void)cancelComposition;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -83,8 +83,7 @@
|
|||||||
|
|
||||||
- (void)keyboardInputSourceChanged:(NSNotification *)notification
|
- (void)keyboardInputSourceChanged:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
[mInputTextView setString:@""];
|
[self cancelComposition];
|
||||||
[self orderOut:nil];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)interpretKeyEvent:(NSEvent*)event string:(NSString**)string
|
- (BOOL)interpretKeyEvent:(NSEvent*)event string:(NSString**)string
|
||||||
@ -119,4 +118,10 @@
|
|||||||
return [mInputTextView inputContext];
|
return [mInputTextView inputContext];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)cancelComposition
|
||||||
|
{
|
||||||
|
[mInputTextView setString:@""];
|
||||||
|
[self orderOut:nil];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -5367,7 +5367,13 @@ static const char* ToEscapedString(NSString* aString, nsCAutoString& aBuf)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!mPluginComplexTextInputRequested) {
|
if (!mPluginComplexTextInputRequested) {
|
||||||
// Ideally we'd cancel any TSM composition here.
|
#ifdef NP_NO_CARBON
|
||||||
|
[[ComplexTextInputPanel sharedComplexTextInputPanel] cancelComposition];
|
||||||
|
#else
|
||||||
|
if (mPluginTSMDoc) {
|
||||||
|
::FixTSMDocument(mPluginTSMDoc);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user