From 1308fe53384234a737bf4a8d279d73250293736e Mon Sep 17 00:00:00 2001 From: "Myoungwoon Roy, Kim" Date: Mon, 19 Feb 2018 06:39:47 -0500 Subject: [PATCH] ecore-evas: Replace ecore_wl_dpi_get with ecore_wl2_output_dpi_get Summary: This patch replaces ecore_wl_dpi_get with ecore_wl2_output_dpi_get using Ecore_Wl2_Output Test Plan: Execute test suite Reviewers: cedric, raster, jpeg, stefan_schmidt, Jaehyun_Cho, devilhorns Reviewed By: devilhorns Differential Revision: https://phab.enlightenment.org/D5804 --- .../engines/wayland/ecore_evas_wayland_common.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 4593ae8655..2a5b71ec3b 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -1934,19 +1934,24 @@ _ecore_evas_wl_common_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, } static void -_ecore_evas_wl_common_screen_dpi_get(const Ecore_Evas *ee EINA_UNUSED, int *xdpi, int *ydpi) +_ecore_evas_wl_common_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi) { + Ecore_Wl2_Window *win; + Ecore_Wl2_Output *output; int dpi = 0; LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!ee) return; if (xdpi) *xdpi = 0; if (ydpi) *ydpi = 0; /* FIXME: Ideally this needs to get the DPI from a specific screen */ - /* TODO */ - /* dpi = ecore_wl_dpi_get(); */ + win = ecore_evas_wayland2_window_get(ee); + output = ecore_wl2_window_output_find(win); + dpi = ecore_wl2_output_dpi_get(output); + if (xdpi) *xdpi = dpi; if (ydpi) *ydpi = dpi; }