From e4d47ed3a5c7f1df729fafc6390755275f2257be Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 15 Jun 2017 16:34:22 +0900 Subject: [PATCH] cnp: Avoid CRI message about wayland in X Test scenario: elementary_test -to "Window Inline" Click on an entry, select some text (maybe with the keyboard) There was a CRI message inside _ecore_evas_interface_get because ecore_evas_wayland2_window_get() was called on an X11 ecore_evas (not wayland). The function was supposed to return NULL here. --- src/lib/elementary/elm_cnp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c index e0c6344..249ada4 100644 --- a/src/lib/elementary/elm_cnp.c +++ b/src/lib/elementary/elm_cnp.c @@ -4042,9 +4042,9 @@ _wl_elm_widget_window_get(const Evas_Object *obj) { ee = ecore_evas_buffer_ecore_evas_parent_get(ee); if (!ee) return NULL; - win = ecore_evas_wayland2_window_get(ee); + engine_name = ecore_evas_engine_name_get(ee); } - else if (!strncmp(engine_name, "wayland", sizeof("wayland") - 1)) + if (!strncmp(engine_name, "wayland", sizeof("wayland") - 1)) { /* In case the engine is not a buffer, we want to check once. */ win = ecore_evas_wayland2_window_get(ee); -- 2.7.4