From 934a0bc63d49ec99a41c625ecaf7b006c9812cdb Mon Sep 17 00:00:00 2001 From: "Myoungwoon Roy, Kim" Date: Wed, 14 Feb 2018 12:49:00 +0900 Subject: [PATCH] Replace ecore_wl_dpi_get with ecore_wl2_output_dpi_get This patch replaces ecore_wl_dpi_get with ecore_wl2_output_dpi_get using Ecore_Wl2_Output Change-Id: I4e6f0395638274b2ed5565933092c6464025cc6e --- .../ecore_evas/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 c2cbae8..c914209 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 @@ -2632,19 +2632,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; } -- 2.7.4