e_eom: add external output checking function 57/143757/2
authorJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 11 Aug 2017 07:12:02 +0000 (16:12 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Sun, 13 Aug 2017 23:07:24 +0000 (23:07 +0000)
if there is any external output, do not init eom. return TRUE.

Change-Id: Idda1521e4dd2bd65a0393e1fd8df33af35f5056e
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/bin/e_eom.c

index 2922ce2..70714d7 100644 (file)
@@ -3429,6 +3429,23 @@ _e_eom_cb_rotation_end(void *data, int evtype EINA_UNUSED, void *event)
    return ECORE_CALLBACK_PASS_ON;
 }
 #endif
+
+static Eina_Bool
+_e_eom_external_output_check()
+{
+   tdm_error ret = TDM_ERROR_NONE;
+   tdm_display *dpy = NULL;
+   int count;
+
+   dpy = e_comp->e_comp_screen->tdisplay;
+
+   ret = tdm_display_get_output_count(dpy, &count);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(ret == TDM_ERROR_NONE, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(count > 1, EINA_FALSE);
+
+   return EINA_TRUE;
+}
+
 static Eina_Bool
 _e_eom_init()
 {
@@ -3436,6 +3453,9 @@ _e_eom_init()
 
    EINA_SAFETY_ON_NULL_GOTO(e_comp_wl, err);
 
+   if (!_e_eom_external_output_check())
+     return EINA_TRUE;
+
    g_eom = E_NEW(E_Eom, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(g_eom, EINA_FALSE);