summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-10-01 10:25:57 -0400
committerChris Michael <cp.michael@samsung.com>2015-12-03 10:22:37 -0500
commit6b1419e3a025171641d8dbc5fb82e3c7549533ab (patch)
treef7bbe5ae589fcad49304018b6cac14f2f9ba7ee5
parent82a8d008fa8d55e451ec13063cc1b0f46c0cb85c (diff)
elementary: Port elementary config code to use Ecore_Wl2 library
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/elm_config.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 29ef12de6..f64e4262c 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -31,6 +31,10 @@ Eio_Monitor *_eio_monitor = NULL;
31 31
32Eina_Hash *_elm_key_bindings = NULL; 32Eina_Hash *_elm_key_bindings = NULL;
33 33
34#ifdef HAVE_ELEMENTARY_WL2
35Ecore_Wl2_Display *_elm_wl_display = NULL;
36#endif
37
34const char *_elm_engines[] = { 38const char *_elm_engines[] = {
35 "software_x11", 39 "software_x11",
36 "fb", 40 "fb",
@@ -3316,6 +3320,10 @@ _elm_config_sub_shutdown(void)
3316#ifdef HAVE_ELEMENTARY_X 3320#ifdef HAVE_ELEMENTARY_X
3317 if (ecore_x_display_get()) ecore_x_shutdown(); 3321 if (ecore_x_display_get()) ecore_x_shutdown();
3318#endif 3322#endif
3323#ifdef HAVE_ELEMENTARY_WL2
3324 if (_elm_wl_display) ecore_wl2_display_disconnect(_elm_wl_display);
3325 ecore_wl2_shutdown();
3326#endif
3319 ELM_SAFE_FREE(_eio_monitor, eio_monitor_del); 3327 ELM_SAFE_FREE(_eio_monitor, eio_monitor_del);
3320 ELM_SAFE_FREE(_config_change_delay_timer, ecore_timer_del); 3328 ELM_SAFE_FREE(_config_change_delay_timer, ecore_timer_del);
3321} 3329}
@@ -3350,7 +3358,7 @@ _elm_config_file_monitor_cb(void *data EINA_UNUSED,
3350void 3358void
3351_elm_config_sub_init(void) 3359_elm_config_sub_init(void)
3352{ 3360{
3353#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_WAYLAND) 3361#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_WL2)
3354 const char *ev = getenv("ELM_DISPLAY"); 3362 const char *ev = getenv("ELM_DISPLAY");
3355#endif 3363#endif
3356 3364
@@ -3385,7 +3393,7 @@ _elm_config_sub_init(void)
3385 ecore_x_init(NULL); 3393 ecore_x_init(NULL);
3386 } 3394 }
3387#endif 3395#endif
3388#ifdef HAVE_ELEMENTARY_WAYLAND 3396#ifdef HAVE_ELEMENTARY_WL2
3389 Eina_Bool init_wl = EINA_FALSE; 3397 Eina_Bool init_wl = EINA_FALSE;
3390 Eina_Bool have_wl_display = !!getenv("WAYLAND_DISPLAY"); 3398 Eina_Bool have_wl_display = !!getenv("WAYLAND_DISPLAY");
3391 3399
@@ -3413,7 +3421,17 @@ _elm_config_sub_init(void)
3413 } 3421 }
3414 if (init_wl) 3422 if (init_wl)
3415 { 3423 {
3416 ecore_wl_init(NULL); 3424 if (!ecore_wl2_init())
3425 {
3426 ERR("Could not initialize Ecore_Wl2");
3427 goto end;
3428 }
3429 _elm_wl_display = ecore_wl2_display_connect(NULL);
3430 if (!_elm_wl_display)
3431 {
3432 ERR("Could not connect to Wayland Display");
3433 goto end;
3434 }
3417 } 3435 }
3418#endif 3436#endif
3419 char buf[PATH_MAX]; 3437 char buf[PATH_MAX];