1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Fixed IME in GTK3 for Lazarus

Only for browsers in OSR mode.
This commit is contained in:
Salvador Díaz Fau
2025-08-26 17:02:21 +02:00
parent 68d581f8b2
commit f32b44aa31
3 changed files with 96 additions and 29 deletions

View File

@@ -207,6 +207,12 @@ type
/// </summary>
function ConnectSignals: boolean;
{$ENDIF}
{$IFDEF LCLGTK3}
/// <summary>
/// This is just a workaround for the missing implementation of SendMessage in GTK3. Don't use!
/// </summary>
procedure SendMessage(var aMessage : TMessage);
{$ENDIF}
/// <summary>
/// Returns the scanline size.
@@ -675,6 +681,15 @@ begin
end;
{$ENDIF}
{$IFDEF LCLGTK3}
// This is just a workaround for the missing implementation of SendMessage in GTK3.
procedure TBufferPanel.SendMessage(var aMessage : TMessage);
begin
if (aMessage.Msg = LM_IM_COMPOSITION) and Focused then
WMIMEComposition(aMessage);
end;
{$ENDIF}
procedure TBufferPanel.CreateIMEHandler;
begin
{$IFDEF MSWINDOWS}
@@ -1162,7 +1177,7 @@ procedure TBufferPanel.WMIMEComposition(var aMessage : TMessage);
var
TempText : ustring;
TempCommit : string;
begin
begin
case aMessage.WPARAM of
GTK_IM_FLAG_START :
if assigned(FOnIMEPreEditStart) then