diff --git a/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp b/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp index 0b44415e0..c8124adfa 100644 --- a/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp +++ b/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp @@ -774,6 +774,8 @@ CIrrDeviceWayland::CIrrDeviceWayland(const SIrrlichtCreationParameters& params) m_display = wl_display_connect(NULL); + m_xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); + m_registry = wl_display_get_registry(m_display); wl_registry_add_listener(m_registry, &WaylandCallbacks::registry_listener, this); @@ -781,8 +783,6 @@ CIrrDeviceWayland::CIrrDeviceWayland(const SIrrlichtCreationParameters& params) wl_display_dispatch(m_display); wl_display_roundtrip(m_display); - m_xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); - if (CreationParams.DriverType != video::EDT_NULL) { if (!createWindow())