}
static void
-_scale_set(Evas_Object *win)
+_scale_set(void)
{
Evas_Coord w, h;
float inch, scale = 0.0, saved_scale = 0.0, profile_factor = 1.0;
int dpi;
- Ecore_Wl2_Window *wlwin = elm_win_wl_window_get(win);
+ Ecore_Wl2_Display *wldp = ecore_wl2_display_connect(NULL);
+ Ecore_Wl2_Window *wlwin = ecore_wl2_window_new(wldp, NULL, 0, 0, 1, 1);
Ecore_Wl2_Output *wlout = ecore_wl2_window_output_find(wlwin);
- Ecore_Wl2_Display *wldp = ecore_wl2_window_display_get(wlwin);
+
+ if (!wldp || !wlwin || !wlout)
+ {
+ EINA_LOG_ERR("efl-config :: %s is NULL",
+ !wldp ? "display" : (!wlwin ? "window" : "output"));
+ return;
+ }
ecore_wl2_sync();
dpi = ecore_wl2_output_dpi_get(wlout);
elm_config_save();
elm_config_all_flush();
}
+
+ ecore_wl2_window_free(wlwin);
}
static void
EINA_LOG_INFO("efl-config :: START");
- Evas_Object *win = elm_win_add(NULL, "config", ELM_WIN_BASIC);
-
if (argc > 1)
{
/* do if this daemon launched by system socket */
else
{
EINA_LOG_DBG("efl-config :: Launching without option. Call _scale_set()");
- _scale_set(win);
+ _scale_set();
}
if (opt_with_message)