As backend_type is "x11" (CLUTTER_WINDOWING_X11), it'll skip the EGL verification, but will fail while checking the X11 backend.
When running with GDB the check CLUTTER_IS_BACKEND_X11 (context->backend) returned FALSE, breaking the logic and then skipping any input method initialization.
Gdb output:
(gdb) p context
$1 = (ClutterMainContext *) 0x19a20
(gdb) p context->backend->cogl_display
$2 = (CoglDisplay *) 0x16928
(gdb) p context->backend->cogl_renderer
$3 = (CoglRenderer *) 0x1fc90
(gdb) p context->backend->cogl_renderer->connected
$4 = 1
(gdb) p context->backend->cogl_renderer->winsys_id_override
$5 = COGL_WINSYS_ID_ANY
(gdb) p context->backend->cogl_renderer->constraints
$6 = (GList *) 0x0
(gdb) p context->backend->cogl_renderer->foreign_xdpy
$7 = (Display *) 0x0
(gdb) p context->backend->cogl_renderer->driver
$8 = COGL_DRIVER_GLES2
(gdb) p backend_type
$9 = 0x1a483 "x11"
Here's the code that checks for a valid input and fail: backend_ real_init_ events (ClutterBackend *backend) INPUT_BACKEND" ); check_windowing _backend (CLUTTER_ WINDOWING_ X11) && input_backend == NULL || input_backend == I_(CLUTTER_ INPUT_X11) )) clutter_ backend_ x11_events_ init (backend); INPUT_NULL) )
clutter-backend.c + 459:
clutter_
...
input_backend = g_getenv ("CLUTTER_
if (input_backend != NULL)
input_backend = g_intern_string (input_backend);
...
#ifdef CLUTTER_INPUT_X11
if (clutter_
(
{
_
}
else
#endif
....
if (input_backend != NULL)
{
if (input_backend != I_(CLUTTER_
g_error ("Unrecognized input backend '%s'", input_backend);
}
else
g_error ("Unknown input backend");
As CLUTTER_INPUT_X11 exists, it'll first try to check the windowing_backend and then set the input_backend.
Here's what happen at clutter_ check_windowing _backend: ntext *context = _clutter_ context_ get_default ();
clutter-main.c + 3672:
ClutterMainCo
g_return_ val_if_ fail (backend_type != NULL, FALSE);
backend_type = g_intern_string (backend_type); WINDOWING_ EGL WINDOWING_ EGL) && IS_BACKEND_ EGL_NATIVE (context->backend)) WINDOWING_ X11 WINDOWING_ X11) && IS_BACKEND_ X11 (context->backend))
...
#ifdef CLUTTER_
if (backend_type == I_(CLUTTER_
CLUTTER_
return TRUE;
else
#endif
...
#ifdef CLUTTER_
if (backend_type == I_(CLUTTER_
CLUTTER_
return TRUE;
else
#endif
return FALSE;
As backend_type is "x11" (CLUTTER_ WINDOWING_ X11), it'll skip the EGL verification, but will fail while checking the X11 backend.
When running with GDB the check CLUTTER_ IS_BACKEND_ X11 (context->backend) returned FALSE, breaking the logic and then skipping any input method initialization.
Gdb output: >backend- >cogl_display >backend- >cogl_renderer >backend- >cogl_renderer- >connected >backend- >cogl_renderer- >winsys_ id_override >backend- >cogl_renderer- >constraints >backend- >cogl_renderer- >foreign_ xdpy >backend- >cogl_renderer- >driver
(gdb) p context
$1 = (ClutterMainContext *) 0x19a20
(gdb) p context-
$2 = (CoglDisplay *) 0x16928
(gdb) p context-
$3 = (CoglRenderer *) 0x1fc90
(gdb) p context-
$4 = 1
(gdb) p context-
$5 = COGL_WINSYS_ID_ANY
(gdb) p context-
$6 = (GList *) 0x0
(gdb) p context-
$7 = (Display *) 0x0
(gdb) p context-
$8 = COGL_DRIVER_GLES2
(gdb) p backend_type
$9 = 0x1a483 "x11"