X11: Fix X Input Methods (XIM) (STR 3502, 3192)

Revert commit 958d912ffcdb using 'XSetLocaleModifiers("@im=");'
which was incorrect (STR 3192).

Apply fix for STR 3502, using 'XSetLocaleModifiers("");' which appears
to be the correct solution for using X Input Methods (XIM).

This has also been backported to FLTK 1.3.6 in branch-1.3, see
commit 219ae5e455e7943ffb35fdd5edbe13dcc6955423.
This commit is contained in:
Albrecht Schlosser 2020-02-10 13:38:26 +01:00
parent 4c1b92eb52
commit 924289a40c

View File

@ -3,17 +3,17 @@
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
// Copyright 1998-2020 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
// https://www.fltk.org/COPYING.php
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
// https://www.fltk.org/str.php
//
#if !defined(FL_DOXYGEN)
@ -608,7 +608,7 @@ void Fl_X11_Screen_Driver::open_display_platform() {
if (fl_display) return;
setlocale(LC_CTYPE, "");
XSetLocaleModifiers("@im=");
XSetLocaleModifiers("");
XSetIOErrorHandler(io_error_handler);
XSetErrorHandler(xerror_handler);
@ -1374,7 +1374,7 @@ int fl_handle(const XEvent& thisevent)
xim_im = XOpenIM(fl_display, NULL, NULL, NULL);
if (!xim_im) {
/* XIM server has crashed */
XSetLocaleModifiers("@im=");
XSetLocaleModifiers("");
fl_xim_im = NULL;
fl_init_xim();
} else {