summaryrefslogtreecommitdiff
path: root/platform/linuxbsd
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-03-02 10:25:50 +0200
committerYuri Sizov <yuris@humnom.net>2023-03-13 14:08:31 +0100
commit1d21652f80458d73394f7fb8e4cf1cf907a098da (patch)
treee5746eb41caed335ae2a6466460143d81fe8a05f /platform/linuxbsd
parentf55c61d6011551eb1ca4eb840ff2b3ccc62a5fcb (diff)
[Linux/X11] Check if required xkb functions exist before using it.
(cherry picked from commit 8a675f3824db71f0fc3268a95b73af3a50800c2f)
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index dff2f536a8..d1f1115aad 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -5258,6 +5258,9 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
}
#ifdef XKB_ENABLED
xkb_loaded = (initialize_xkbcommon(dylibloader_verbose) == 0);
+ if (!xkb_context_new || !xkb_compose_table_new_from_locale || !xkb_compose_table_unref || !xkb_context_unref || !xkb_compose_state_feed || !xkb_compose_state_unref || !xkb_compose_state_new || !xkb_compose_state_get_status || !xkb_compose_state_get_utf8 || !xkb_keysym_to_utf32 || !xkb_keysym_to_upper) {
+ xkb_loaded = false;
+ }
#endif
if (initialize_xext(dylibloader_verbose) != 0) {
r_error = ERR_UNAVAILABLE;