Cocoa: IME: inputclient and inputctx in TCocoaApplication removed

This commit is contained in:
rich2014 2023-07-04 20:45:25 +08:00
parent fdb49c0dd6
commit 873c352755

View File

@ -84,8 +84,6 @@ type
aloop : TApplicationMainLoop;
isrun : Boolean;
modals : NSMutableDictionary;
inputclient : TCocoaInputClient;
inputctx : NSTextInputContext;
{$ifdef COCOAPPRUNNING_OVERRIDEPROPERTY}
Stopped : Boolean;
{$endif}
@ -473,7 +471,6 @@ end;
procedure TCocoaApplication.dealloc;
begin
if Assigned(modals) then modals.release;
if Assigned(inputclient) then inputclient.release;
inherited dealloc;
end;
@ -585,19 +582,6 @@ begin
else
wnd := nil;
{$ifndef CPUPOWERPC}
if (theEvent.type_ = NSKeyDown)
and not (win.firstResponder.conformsToProtocol(objcprotocol(NSTextInputClientProtocol))) then
begin
if not Assigned(inputctx) then
begin
inputclient := TCocoaInputClient.alloc.init;
inputctx := NSTextInputContext.alloc.initWithClient(inputclient);
end;
inputctx.handleEvent(theEvent);
end;
{$endif}
if cb.IsCocoaOnlyState then
begin
inherited sendEvent(theEvent);