From 0ff9a162c1716ba5695f8efbfb8a271d882d884b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Apr 2025 11:24:02 +0000 Subject: [PATCH] Fix: memory leak on Wayland with IME For practical purposes this only leaks on exit, unless seats are change at run-time. --- intern/ghost/intern/GHOST_SystemWayland.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/intern/ghost/intern/GHOST_SystemWayland.cc b/intern/ghost/intern/GHOST_SystemWayland.cc index d0f7662b970..030d85807c8 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cc +++ b/intern/ghost/intern/GHOST_SystemWayland.cc @@ -6806,6 +6806,12 @@ static void gwl_registry_wl_seat_remove(GWL_Display *display, void *user_data, c zwp_primary_selection_device_v1_destroy(seat->wp.primary_selection_device); } +#ifdef WITH_INPUT_IME + if (seat->wp.text_input) { + zwp_text_input_v3_destroy(seat->wp.text_input); + } +#endif + if (seat->wl.data_device) { wl_data_device_release(seat->wl.data_device); }