Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit bc45d04

Browse files
authored
Set the IM context when showing the input method (#21896)
1 parent 3051288 commit bc45d04

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

shell/platform/linux/fl_text_input_plugin.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ static FlMethodResponse* set_client(FlTextInputPlugin* self, FlValue* args) {
258258

259259
// Shows the input method.
260260
static FlMethodResponse* show(FlTextInputPlugin* self) {
261+
// Set the top-level window used for system input method windows.
262+
GdkWindow* window =
263+
gtk_widget_get_window(gtk_widget_get_toplevel(GTK_WIDGET(self->view)));
264+
gtk_im_context_set_client_window(self->im_context, window);
265+
261266
gtk_im_context_focus_in(self->im_context);
262267

263268
return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));

0 commit comments

Comments
 (0)