#define COMPOSITOR_VERSION 4
+#define E_COM_WL_PREPARE_GAP_LOG_TIME 2000
+
EINTERN int E_EVENT_WAYLAND_GLOBAL_ADD = -1;
#include "session-recovery-server-protocol.h"
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
}
+static Eina_Bool
+_e_comp_wl_cb_idle_exiter(void *data EINA_UNUSED)
+{
+ e_comp_wl->idle_exiter_timestamp = ecore_time_get() * 1000;
+
+ return ECORE_CALLBACK_RENEW;
+}
+
static Eina_Bool
_e_comp_wl_cb_read(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
{
static void
_e_comp_wl_cb_prepare(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
{
+ double gap_time;
+
+ if (e_comp_wl->idle_exiter_timestamp > 0.0)
+ {
+ gap_time = (ecore_time_get() * 1000) - e_comp_wl->idle_exiter_timestamp;
+ if (gap_time > E_COM_WL_PREPARE_GAP_LOG_TIME)
+ {
+ ELOGF("E_COMP", "gap between idle_exiter with cb_prepare is %lfms",
+ NULL, gap_time);
+ }
+ }
+
+ e_comp_wl->idle_exiter_timestamp = 0.0;
+
/* flush pending client events */
wl_display_flush_clients(e_comp_wl->wl.disp);
}
E_EVENT_WAYLAND_GLOBAL_ADD = ecore_event_type_new();
+ e_comp_wl->idle_exiter = ecore_idle_exiter_add(_e_comp_wl_cb_idle_exiter, NULL);
+
TRACE_DS_END();
return EINA_TRUE;
}
EINTERN void
e_comp_wl_shutdown(void)
{
+ ecore_idle_exiter_del(e_comp_wl->idle_exiter);
+
e_comp_wl_subsurfaces_shutdown();
/* free handlers */
E_FREE_LIST(handlers, ecore_event_handler_del);