summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-07-17 12:50:51 -0400
committerChris Michael <cp.michael@samsung.com>2014-07-17 12:54:13 -0400
commita911794e1a48336a4c6b1d596e3a391dd04090e0 (patch)
tree78685aaf6513e0a2c0a1229b35dd24c67902b282
parent6e1f65b739e4c576d133c7ff464ccddf12ed2657 (diff)
elementary: Don't segfault if we are not using an X11-compatible engine
When running Enlightenment under Wayland only, during init of E we make a call to elm_config_all_flush. elm_config_all_flush is making calls to ecore_x_window function(s) (for setting of elm_profile), However this causes a crash if the ELM_ENGINE is not one that is running under X11 (ie: ELM_ENGINE=drm or wayland_*). So to fix this crash, we will compare the current ELM_ENGINE and see if it is X11-compatible before making unnecessary (and crashing) calls to ecore_x_window functions. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/elm_config.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index f3bce0d01..b308928a0 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -3137,11 +3137,21 @@ elm_config_audio_mute_set(Edje_Channel channel, Eina_Bool mute)
3137EAPI void 3137EAPI void
3138elm_config_all_flush(void) 3138elm_config_all_flush(void)
3139{ 3139{
3140#define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
3141 if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
3142 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
3143 ENGINE_COMPARE(ELM_XRENDER_X11) ||
3144 ENGINE_COMPARE(ELM_OPENGL_X11) ||
3145 ENGINE_COMPARE(ELM_OPENGL_COCOA) ||
3146 ENGINE_COMPARE(ELM_SOFTWARE_WIN32))
3147#undef ENGINE_COMPARE
3148 {
3140#ifdef HAVE_ELEMENTARY_X 3149#ifdef HAVE_ELEMENTARY_X
3141 _prop_config_set(); 3150 _prop_config_set();
3142 ecore_x_window_prop_string_set(_config_win, _atom[ATOM_E_PROFILE], 3151 ecore_x_window_prop_string_set(_config_win, _atom[ATOM_E_PROFILE],
3143 _elm_profile); 3152 _elm_profile);
3144#endif 3153#endif
3154 }
3145} 3155}
3146 3156
3147static void 3157static void