From d096b4bc34faefdbc6f6213d553d0c48bf705a7d Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Sun, 19 Jul 2020 16:43:36 +0200 Subject: ecore_imf_xim: remove calls to XCreateFontSet() Summary: I use ECORE_IMF_MODULE=xim for ages and I had random crashes here, mostly on terminology's start-up. I've done that patch months ago (if not late last year) and I have not had a single crash since then. Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12059 --- src/modules/ecore_imf/xim/ecore_imf_xim.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/src/modules/ecore_imf/xim/ecore_imf_xim.c b/src/modules/ecore_imf/xim/ecore_imf_xim.c index 5bb8c4ae2e..09e98c5c9b 100644 --- a/src/modules/ecore_imf/xim/ecore_imf_xim.c +++ b/src/modules/ecore_imf/xim/ecore_imf_xim.c @@ -1128,32 +1128,9 @@ _ecore_imf_xim_ic_get(Ecore_IMF_Context *ctx) if (imf_context_data->use_preedit == EINA_TRUE) { - if (im_info->supports_cursor) - { - // kinput2 DOES do this... - XFontSet fs; - char **missing_charset_list; - int missing_charset_count; - char *def_string; - - im_style |= XIMPreeditPosition; - im_style |= XIMStatusNothing; - fs = XCreateFontSet(ecore_x_display_get(), - "fixed", - &missing_charset_list, - &missing_charset_count, - &def_string); - preedit_attr = XVaCreateNestedList(0, - XNSpotLocation, &spot, - XNFontSet, fs, - NULL); - } - else - { - im_style |= XIMPreeditCallbacks; - im_style |= XIMStatusNothing; - preedit_attr = _ecore_imf_xim_preedit_callback_set(ctx); - } + im_style |= XIMPreeditCallbacks; + im_style |= XIMStatusNothing; + preedit_attr = _ecore_imf_xim_preedit_callback_set(ctx); name = XNPreeditAttributes; } else -- cgit v1.2.1