7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 23:23:47 +00:00

GTK: Enable IME cancellation on canvas focus

This means that it doesn't start consuming hotkeys for
IME composition in the main canvas on Linux.

Text boxes in dialogs and the property manager, for example,
still receive IME composition.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/9882
This commit is contained in:
John Beard 2024-08-14 09:26:37 +01:00
parent 889aee3b1a
commit c7fa61cd94

View File

@ -323,6 +323,15 @@ void KIPLATFORM::UI::ImmControl( wxWindow* aWindow, bool aEnable )
void KIPLATFORM::UI::ImeNotifyCancelComposition( wxWindow* aWindow )
{
wxWindowGTK* win = static_cast<wxWindowGTK*>( aWindow );
if( win )
{
GtkIMContext* imContext = win->m_imContext;
if( imContext )
{
gtk_im_context_focus_out( imContext );
}
}
}