static Eina_Bool session_state = EINA_FALSE;
static Eina_Bool
-_e_mod_drm_cb_activate(void *data, int type EINA_UNUSED, void *event)
+_e_mod_drm_cb_activate(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Drm_Event_Activate *e;
- E_Comp *c;
- if ((!event) || (!data)) goto end;
- e = event;
- c = data;
+ if (!(e = event)) goto end;
if (e->active)
{
if (session_state) goto end;
session_state = EINA_TRUE;
- ecore_evas_show(c->ee);
+ ecore_evas_show(e_comp->ee);
E_CLIENT_FOREACH(ec)
{
if (ec->visible && (!ec->input_only))
else
{
session_state = EINA_FALSE;
- ecore_evas_hide(c->ee);
+ ecore_evas_hide(e_comp->ee);
edje_file_cache_flush();
edje_collection_cache_flush();
- evas_image_cache_flush(c->evas);
- evas_font_cache_flush(c->evas);
- evas_render_dump(c->evas);
+ evas_image_cache_flush(e_comp->evas);
+ evas_font_cache_flush(e_comp->evas);
+ evas_render_dump(e_comp->evas);
e_comp_render_queue();
e_comp_shape_queue_block(1);
EAPI void *
e_modapi_init(E_Module *m)
{
- E_Comp *comp;
int w = 0, h = 0;
printf("LOAD WL_DRM MODULE\n");
/* return NULL; */
/* } */
- if (!(comp = e_comp))
+ if (!e_comp)
{
- comp = e_comp_new();
- comp->comp_type = E_PIXMAP_TYPE_WL;
+ e_comp_new();
+ e_comp->comp_type = E_PIXMAP_TYPE_WL;
}
if (e_comp_config_get()->engine == E_COMP_ENGINE_GL)
{
- comp->ee = ecore_evas_gl_drm_new(NULL, 0, 0, 0, 1, 1);
- e_comp_gl_set(!!comp->ee);
+ e_comp->ee = ecore_evas_gl_drm_new(NULL, 0, 0, 0, 1, 1);
+ e_comp_gl_set(!!e_comp->ee);
}
/* fallback to framebuffer drm (non-accel) */
- if (!comp->ee)
- comp->ee = ecore_evas_drm_new(NULL, 0, 0, 0, 1, 1);
+ if (!e_comp->ee)
+ e_comp->ee = ecore_evas_drm_new(NULL, 0, 0, 0, 1, 1);
- if (comp->ee)
+ if (e_comp->ee)
e_comp_gl_set(EINA_FALSE);
else
{
}
/* get the current screen geometry */
- ecore_evas_screen_geometry_get(comp->ee, NULL, NULL, &w, &h);
+ ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &w, &h);
/* resize the canvas */
- ecore_evas_resize(comp->ee, w, h);
+ ecore_evas_resize(e_comp->ee, w, h);
/* TODO: hook ecore_evas_callback_resize_set */
/* NB: This needs to be called AFTER the comp canvas has been setup */
if (!e_comp_wl_init()) return NULL;
- e_comp_wl_input_pointer_enabled_set(comp->wl_comp_data, EINA_TRUE);
- e_comp_wl_input_keyboard_enabled_set(comp->wl_comp_data, EINA_TRUE);
+ e_comp_wl_input_pointer_enabled_set(e_comp->wl_comp_data, EINA_TRUE);
+ e_comp_wl_input_keyboard_enabled_set(e_comp->wl_comp_data, EINA_TRUE);
/* comp->pointer = */
/* e_pointer_window_new(ecore_evas_window_get(comp->ee), 1); */
- comp->pointer = e_pointer_canvas_new(comp->ee, EINA_TRUE);
- comp->pointer->color = EINA_TRUE;
+ e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE);
+ e_comp->pointer->color = EINA_TRUE;
/* FIXME: We need a way to trap for user changing the keymap inside of E
* without the event coming from X11 */
/* FIXME: This is just for testing at the moment....
* happens to jive with what drm does */
- e_comp_wl_input_keymap_set(comp->wl_comp_data, NULL, NULL, NULL);
+ e_comp_wl_input_keymap_set(e_comp->wl_comp_data, NULL, NULL, NULL);
activate_handler =
ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE,
- _e_mod_drm_cb_activate, comp);
+ _e_mod_drm_cb_activate, NULL);
output_handler =
ecore_event_handler_add(ECORE_DRM_EVENT_OUTPUT,
- _e_mod_drm_cb_output, comp);
+ _e_mod_drm_cb_output, NULL);
return m;
}