summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-03-05 11:31:30 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-03-05 11:31:30 -0500
commitac67dc68aee0cc78e700845b06edd2a3d712cc1a (patch)
tree294e1f60f4c35b74a44ae840878f5931658b86b8
parentada4c48cc46259a180c33cb04a7b96af5a03cd00 (diff)
cnp should only attempt to get wl win for wl engine canvases
fixes abort() on missing wl ee interface
-rw-r--r--src/lib/elm_cnp.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index c5daef718..5f15461a8 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -3560,27 +3560,25 @@ _wl_elm_widget_window_get(Evas_Object *obj)
3560 { 3560 {
3561 Ecore_Evas *ee; 3561 Ecore_Evas *ee;
3562 Evas *evas; 3562 Evas *evas;
3563 const char *engine_name;
3563 3564
3564 if (!(evas = evas_object_evas_get(obj))) 3565 if (!(evas = evas_object_evas_get(obj)))
3565 return 0; 3566 return 0;
3566 if (!(ee = ecore_evas_ecore_evas_get(evas))) 3567 if (!(ee = ecore_evas_ecore_evas_get(evas)))
3567 return 0; 3568 return 0;
3568 3569
3569 while(!win) 3570 engine_name = ecore_evas_engine_name_get(ee);
3571 if (!strcmp(engine_name, ELM_BUFFER))
3570 { 3572 {
3571 const char *engine_name = ecore_evas_engine_name_get(ee); 3573 ee = ecore_evas_buffer_ecore_evas_parent_get(ee);
3572 if (!strcmp(engine_name, ELM_BUFFER)) 3574 if (!ee) return 0;
3573 { 3575 win = ecore_evas_wayland_window_get(ee);
3574 ee = ecore_evas_buffer_ecore_evas_parent_get(ee); 3576 }
3575 if (!ee) return 0; 3577 else if (!strncmp(engine_name, "wayland", sizeof("wayland") - 1))
3576 win = ecore_evas_wayland_window_get(ee); 3578 {
3577 } 3579 /* In case the engine is not a buffer, we want to check once. */
3578 else 3580 win = ecore_evas_wayland_window_get(ee);
3579 { 3581 if (!win) return 0;
3580 /* In case the engine is not a buffer, we want to check once. */
3581 win = ecore_evas_wayland_window_get(ee);
3582 if (!win) return 0;
3583 }
3584 } 3582 }
3585 } 3583 }
3586 3584