LCL-Gtk2: Do not reset IM after mouse click, otherwise the composition with pre-existing string will be broken. Patch by rasberryrabbit, issue #41123.

This commit is contained in:
Maxim Ganetsky 2024-09-16 18:58:23 +03:00
parent 0e11791719
commit c9260ad82c

View File

@ -2203,7 +2203,12 @@ var
if im_context_widget<>TargetWidget then
begin
//DebugLn(['CheckDeadKey init im_context ',GetWidgetDebugReport(TargetWidget)]);
ResetDefaultIMContext;
// After mouse click, first composition char isn't returned to pre-edit string.
// It has occurred with fcitx IM, but should happen with other IM like nabi too.
// So the following line is commented out to fix this.
//ResetDefaultIMContext;
im_context_widget:=TargetWidget;
gtk_im_context_set_client_window(im_context,GetControlWindow(TargetWidget));
//DebugLn(['CheckDeadKey im_context initialized']);