create wl_outputs when in wayland-only mode

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-02-24 13:27:56 -05:00
parent a8eb773752
commit d89681fa3c
1 changed files with 10 additions and 16 deletions

View File

@ -55,28 +55,20 @@ end:
} }
static Eina_Bool static Eina_Bool
_e_mod_drm_cb_output(void *data, int type EINA_UNUSED, void *event) _e_mod_drm_cb_output(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{ {
Ecore_Drm_Event_Output *e; Ecore_Drm_Event_Output *e;
Eina_List *l; char buff[PATH_MAX];
E_Comp *c;
struct wl_resource *resource;
if ((!event) || (!data)) goto end; if (!(e = event)) goto end;
e = event;
c = data;
if (!e->plug) goto end; if (!e->plug) goto end;
EINA_LIST_FOREACH(c->wl_comp_data->output.resources, l, resource) snprintf(buff, sizeof(buff), "%d", e->id);
{ e_comp_wl_output_init(buff, e->make, e->model, e->x, e->y, e->w, e->h,
wl_output_send_geometry(resource, e->x, e->y, e->phys_width, e->phys_width, e->phys_height, e->refresh,
e->phys_height, e->subpixel_order, e->subpixel_order, e->transform);
e->make, e->model, e->transform);
wl_output_send_scale(resource, 1);
if (wl_resource_get_version(resource) >= WL_OUTPUT_DONE_SINCE_VERSION)
wl_output_send_done(resource);
}
end: end:
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
@ -171,9 +163,11 @@ e_modapi_init(E_Module *m)
activate_handler = activate_handler =
ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE, ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE,
_e_mod_drm_cb_activate, comp); _e_mod_drm_cb_activate, comp);
output_handler = output_handler =
ecore_event_handler_add(ECORE_DRM_EVENT_OUTPUT, ecore_event_handler_add(ECORE_DRM_EVENT_OUTPUT,
_e_mod_drm_cb_output, comp); _e_mod_drm_cb_output, comp);
return m; return m;
} }