Skip to content

Commit d6f688b

Browse files
committed
Merge pull request godotengine#101684 from bruvzg/wl_ime_upd
[Wayland] Fix excessive IME updates.
2 parents 49481c1 + 133ea4f commit d6f688b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

platform/linuxbsd/wayland/display_server_wayland.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,10 +1223,12 @@ void DisplayServerWayland::process_events() {
12231223

12241224
Ref<WaylandThread::IMEUpdateEventMessage> ime_update_msg = msg;
12251225
if (ime_update_msg.is_valid()) {
1226-
ime_text = ime_update_msg->text;
1227-
ime_selection = ime_update_msg->selection;
1226+
if (ime_text != ime_update_msg->text || ime_selection != ime_update_msg->selection) {
1227+
ime_text = ime_update_msg->text;
1228+
ime_selection = ime_update_msg->selection;
12281229

1229-
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_OS_IME_UPDATE);
1230+
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_OS_IME_UPDATE);
1231+
}
12301232
}
12311233
}
12321234

0 commit comments

Comments
 (0)