From 92e10af291963bd89e682782c38bf4a4cd3b5bca Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 7 Apr 2015 11:50:35 -0400 Subject: [PATCH] ecore-drm: Send ECORE_DRM_EVENT_OUTPUT on unplug also Summary: If we unplug an output, we should still be sending this event so that the compositor can remove any unplugged outputs @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm/ecore_drm_output.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c index 85aee4d786..4fe6c7d50e 100644 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@ -696,21 +696,18 @@ _ecore_drm_event_output_send(const Ecore_Drm_Output *output, Eina_Bool plug) if (!(e = calloc(1, sizeof(Ecore_Drm_Event_Output)))) return; e->plug = plug; - if (plug) - { - e->id = output->crtc_id; - e->w = output->current_mode->width; - e->h = output->current_mode->height; - e->x = output->x; - e->y = output->y; - e->phys_width = output->phys_width; - e->phys_height = output->phys_height; - e->refresh = output->current_mode->refresh; - e->subpixel_order = output->subpixel; - e->make = eina_stringshare_ref(output->make); - e->model = eina_stringshare_ref(output->model); - e->transform = 0; - } + e->id = output->crtc_id; + e->w = output->current_mode->width; + e->h = output->current_mode->height; + e->x = output->x; + e->y = output->y; + e->phys_width = output->phys_width; + e->phys_height = output->phys_height; + e->refresh = output->current_mode->refresh; + e->subpixel_order = output->subpixel; + e->make = eina_stringshare_ref(output->make); + e->model = eina_stringshare_ref(output->model); + e->transform = 0; ecore_event_add(ECORE_DRM_EVENT_OUTPUT, e, _ecore_drm_event_output_free, NULL); }