From 2f9fcc870435334eb16c7df336934eaf650b8364 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Tue, 21 Apr 2015 10:54:12 +0900 Subject: [PATCH] correct the physical size of a drm output Change-Id: I8bffb4fcec5f77e96f2067687bac383e23927805 --- src/lib/ecore_drm/ecore_drm_output.c | 6 ++++-- src/lib/ecore_drm/ecore_drm_private.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c index 6e19169..1b2f0aa 100644 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@ -299,6 +299,8 @@ _ecore_drm_output_create(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConnecto output->dev = dev; output->x = x; output->y = y; + output->mw = conn->mmWidth; + output->mh = conn->mmHeight; output->subpixel = conn->subpixel; output->make = eina_stringshare_add("unknown"); @@ -609,8 +611,8 @@ _ecore_drm_event_output_send(const Ecore_Drm_Output *output, Eina_Bool plug) e->h = output->current_mode->height; e->x = output->x; e->y = output->y; - e->phys_width = 0; - e->phys_height = 0; + e->phys_width = output->mw; + e->phys_height = output->mh; e->refresh = output->current_mode->refresh; e->subpixel_order = output->subpixel; e->make = eina_stringshare_ref(output->make); diff --git a/src/lib/ecore_drm/ecore_drm_private.h b/src/lib/ecore_drm/ecore_drm_private.h index 03a7c27..5f3c1bc 100644 --- a/src/lib/ecore_drm/ecore_drm_private.h +++ b/src/lib/ecore_drm/ecore_drm_private.h @@ -118,6 +118,7 @@ struct _Ecore_Drm_Output int x, y; int drm_fd; + unsigned int mw, mh; Eina_Bool need_repaint : 1; Eina_Bool repaint_scheduled : 1; -- 2.7.4