From 7b2209d6d36e9e4396433e751971a24bfb79d3a3 Mon Sep 17 00:00:00 2001 From: daemyung jang Date: Tue, 30 Jun 2015 13:48:47 +0900 Subject: [PATCH] Fix the runtime error by the uninitialized ecore imf event Ecore IMF Version 1.13 has dev_name in the IMF struct, older versions do not, so adding a define to check if we're at the right version and only setting the member if it does. Change-Id: Ie462238c859295bd5c4291000f49f0219d1b2526 --- adaptors/x11/ecore-x-event-handler.cpp | 6 ++++++ build/tizen/configure.ac | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/adaptors/x11/ecore-x-event-handler.cpp b/adaptors/x11/ecore-x-event-handler.cpp index ccb2e9b..28313d5 100644 --- a/adaptors/x11/ecore-x-event-handler.cpp +++ b/adaptors/x11/ecore-x-event-handler.cpp @@ -647,6 +647,9 @@ struct EventHandler::Impl ecoreKeyDownEvent.timestamp = keyEvent->timestamp; ecoreKeyDownEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers ); ecoreKeyDownEvent.locks = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE; +#ifdef ECORE_IMF_1_13 + ecoreKeyDownEvent.dev_name = ""; +#endif // ECORE_IMF_1_13 eventHandled = ecore_imf_context_filter_event( imfContext, ECORE_IMF_EVENT_KEY_DOWN, @@ -727,6 +730,9 @@ struct EventHandler::Impl ecoreKeyUpEvent.timestamp = keyEvent->timestamp; ecoreKeyUpEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers ); ecoreKeyUpEvent.locks = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE; +#ifdef ECORE_IMF_1_13 + ecoreKeyUpEvent.dev_name = ""; +#endif // ECORE_IMF_1_13 eventHandled = ecore_imf_context_filter_event( imfContext, ECORE_IMF_EVENT_KEY_UP, diff --git a/build/tizen/configure.ac b/build/tizen/configure.ac index 8980728..de9034c 100644 --- a/build/tizen/configure.ac +++ b/build/tizen/configure.ac @@ -53,6 +53,7 @@ PKG_CHECK_MODULES(FRIBIDI, fribidi) PKG_CHECK_MODULES(TTRACE, ttrace, AC_DEFINE(ENABLE_TTRACE, 1, [ttrace available]), [ AC_MSG_NOTICE([Tizen Trace not avaiable]) ] ) +PKG_CHECK_MODULES(ECORE_IMF, [ecore-imf >= 1.13], [ecore_imf_1_13=yes], [ecore_imf_1_13=no]) # Check for EldBus.h in ECore @@ -106,6 +107,11 @@ if test "x$enable_shaderbincache" = "xENABLE"; then DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DSHADERBIN_CACHE_ENABLED" fi +# If Ecore IMF version is greater than 1.13, then some structures are different +if test "x$ecore_imf_1_13" = "xyes"; then + DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DECORE_IMF_1_13" +fi + AC_ARG_ENABLE([gles], [AC_HELP_STRING([--enable-gles], [Specify the OpenGL ES version for backwards compatibility])], @@ -277,6 +283,7 @@ Configuration EldBus: $eldbus_available Shader Binary Cache: $enable_shaderbincache Build for Node.JS (LibUV) $build_for_node_js + Ecore Version At Least 1.13.0 $ecore_imf_1_13 " # optional output of node.js source path if we're building for node.js if test "x$build_for_node_js" != "xno"; then -- 2.7.4