[FIX] orientation event listener 31/29931/2
authorVitaliy Cherepanov <v.cherepanov@samsung.com>
Wed, 5 Nov 2014 17:55:23 +0000 (20:55 +0300)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Wed, 5 Nov 2014 18:02:36 +0000 (10:02 -0800)
Change-Id: I60d38c75718daf7511bb3c4edc52ba0051b45bc1
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
probe_event/orientation.c

index 5343cbc..2436634 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "daprobe.h"
 #include "dahelper.h"
+#include "common_probe_init.h"
 
 
 Ecore_Event_Handler *register_orientation_event_listener();
@@ -88,3 +89,22 @@ void unregister_orientation_event_listener(Ecore_Event_Handler *handler)
 
        probeBlockEnd();
 }
+
+EAPI int ecore_x_init(const char *name)
+{
+       static Ecore_Event_Handler *event_handler = NULL;
+
+       int res = 0;
+       static int (*ecore_x_initp)(const char *name);
+       PRINTMSG("(%s)", name);
+
+       GET_REAL_FUNC_RTLD_NEXT(ecore_x_init);
+       res = ecore_x_initp(name);
+
+       if (event_handler == NULL) {
+               event_handler = register_orientation_event_listener();
+               if (event_handler == NULL)
+                       PRINTERR("Fail to init event listener");
+       }
+       return res;
+}