#include "e_config_intern.h"
#include "e_device_intern.h"
#include "e_comp_wl_input_intern.h"
+#include "e_main_intern.h"
#include <libudev.h>
#include <glib.h>
+#ifdef HAVE_SYSTEMD
+# include <systemd/sd-daemon.h>
+#endif
+
+#define TS_DO
+#ifdef TS_DO
+static double t0, t1, t2;
+#endif
+
static int main_to_input_thread_pipe_fd[2] = {0, };
static gboolean input_dispatch(GSource *source, GSourceFunc callback, gpointer user_data);
e_input_libinput_context_create(input);
+ e_comp_wl_input_keymap_init();
+ e_keyrouter_query_tizen_key_table();
+
+ INF("write wm_ready");
+ if (e_config->create_wm_ready)
+ e_main_create_wm_ready();
+
+#ifdef HAVE_SYSTEMD
+ TSM("[WM] Send start-up completion");
+ sd_notify(0, "READY=1");
+#else
+ TSM("[WM] Skip sending start-up completion. (no systemd)");
+#endif
+
/* enable this input */
if (!e_input_enable_input(input))
{
g_source_set_callback(pipe_source, (GSourceFunc)_pipe_recv_handler, input, NULL);
g_source_attach(pipe_source, context);
- e_comp_wl_input_keymap_init();
- e_keyrouter_query_tizen_key_table();
-
e_keyrouter_input_handler_add();
e_input_thread_id_set(gettid());
#ifdef __linux__
# include <sys/prctl.h>
#endif
-#ifdef HAVE_SYSTEMD
-# include <systemd/sd-daemon.h>
-#endif
#define MAX_LEVEL 80
#define TS_DO
#ifdef TS_DO
-# define TS(x) \
- { \
- t1 = ecore_time_unix_get(); \
- printf("ESTART: %1.5f [%1.5f] - %s\n", t1 - t0, t1 - t2, x); \
- t2 = t1; \
- }
-
-# define TSB(x) \
- do { \
- TRACE_DS_BEGIN(ESTART: %s, x); \
- TS(x); \
- } while (0)
-# define TSE(x) \
- do { \
- TRACE_DS_END(); \
- TS(x); \
- } while (0)
-# define TSM(x) \
- do { \
- TRACE_DS_MARK(ESTART: %s, x); \
- TS(x); \
- } while (0)
static double t0, t1, t2;
-#else
-# define TS(x)
-# define TSB(x)
-# define TSE(x)
-# define TSM(x)
#endif
+
/*
* i need to make more use of these when i'm baffled as to when something is
* up. other hooks:
static void _e_main_desk_restore(void);
static Eina_Bool _e_main_cb_idle_before(void *data EINA_UNUSED);
static Eina_Bool _e_main_cb_idle_after(void *data EINA_UNUSED);
-static void _e_main_create_wm_ready(void);
static void _e_main_hooks_clean(void);
static void _e_main_hook_call(E_Main_Hook_Point hookpoint, void *data EINA_UNUSED);
TSM("MAIN LOOP AT LAST");
- if (e_config->create_wm_ready)
- _e_main_create_wm_ready();
-
TRACE_DS_END();
-#ifdef HAVE_SYSTEMD
- TSM("[WM] Send start-up completion");
- sd_notify(0, "READY=1");
-#else
- TSM("[WM] Skip sending start-up completion. (no systemd)");
-#endif
ecore_main_loop_begin();
ELOGF("COMP", "STOPPING enlightenment...", NULL);
return ECORE_CALLBACK_RENEW;
}
-static void
-_e_main_create_wm_ready(void)
+EINTERN void
+e_main_create_wm_ready(void)
{
FILE *_wmready_checker = NULL;
const char *path_wm_ready = "/run/.wm_ready";
#include "e_intern.h"
#include "e_main.h"
+#define TS_DO
+#ifdef TS_DO
+
+# define TS(x) \
+ { \
+ t1 = ecore_time_unix_get(); \
+ printf("ESTART: %1.5f [%1.5f] - %s\n", t1 - t0, t1 - t2, x); \
+ t2 = t1; \
+ }
+
+# define TSB(x) \
+ do { \
+ TRACE_DS_BEGIN(ESTART: %s, x); \
+ TS(x); \
+ } while (0)
+# define TSE(x) \
+ do { \
+ TRACE_DS_END(); \
+ TS(x); \
+ } while (0)
+# define TSM(x) \
+ do { \
+ TRACE_DS_MARK(ESTART: %s, x); \
+ TS(x); \
+ } while (0)
+
+#else
+# define TS(x)
+# define TSB(x)
+# define TSE(x)
+# define TSM(x)
+#endif
+
+EINTERN void e_main_create_wm_ready(void);
+
#endif