diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-11-22 21:29:01 +0000 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-11-22 21:31:01 +0000 |
commit | 5311687e6de790c4f426a582559b71f7399b4571 (patch) | |
tree | af8cb0d2db7394b1bcfc46298f90459d1959654e | |
parent | be1db92dbbcbd85c3535215b0605bb64dfe0577b (diff) | |
download | enlightenment-5311687e6de790c4f426a582559b71f7399b4571.tar.gz |
scaling - set Xft.dpi and merge properly with .Xdefaults
this uses new efl functions so ... you need a git efl now (and
eventually 1.26). this sets Xft.dpi to match the xsettings dpi etc.
etc. ... so it all matches up.
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | src/bin/e_deskenv.c | 25 | ||||
-rw-r--r-- | src/bin/e_scale.c | 4 |
3 files changed, 21 insertions, 10 deletions
diff --git a/meson.build b/meson.build index 7cfc277e34..e470579b3f 100644 --- a/meson.build +++ b/meson.build @@ -39,7 +39,7 @@ e_version_rev = '.'.join([ver, git_version]) release = 'dev-0.24.99' #### -efl_version = '>= 1.24.1' +efl_version = '>= 1.25.99' add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c') dir_prefix = get_option('prefix') diff --git a/src/bin/e_deskenv.c b/src/bin/e_deskenv.c index c8844714fb..296574da89 100644 --- a/src/bin/e_deskenv.c +++ b/src/bin/e_deskenv.c @@ -4,23 +4,32 @@ EINTERN int e_deskenv_init(void) { #ifndef HAVE_WAYLAND_ONLY - char buf[PATH_MAX], buf2[PATH_MAX + sizeof("xrdb -load ")]; + char buf[PATH_MAX], buf2[PATH_MAX + sizeof("xrdb -override ")]; // run xdrb -load .Xdefaults & .Xresources // NOTE: one day we should replace this with an e based config + service if (e_config->deskenv.load_xrdb) { + Eina_Bool exists = EINA_FALSE; + e_user_homedir_concat(buf, sizeof(buf), ".Xdefaults"); - if (ecore_file_exists(buf)) + exists = ecore_file_exists(buf); + if (!exists) { - snprintf(buf2, sizeof(buf2), "xrdb -load %s", buf); - ecore_exe_run(buf2, NULL); + e_user_homedir_concat(buf, sizeof(buf), ".Xresources"); + exists = ecore_file_exists(buf); } - e_user_homedir_concat(buf, sizeof(buf), ".Xresources"); - if (ecore_file_exists(buf)) + if (exists) { - snprintf(buf2, sizeof(buf2), "xrdb -load %s", buf); - ecore_exe_run(buf2, NULL); +#if 1 + snprintf(buf2, sizeof(buf2), "xrdb -override %s", buf); + system(buf2); +#else + // while this SHOULD work.. it ends up with mysterious problems + // inside xlib that i seem to not be able to trap easily... + ecore_x_rersource_load(buf); + ecore_x_resource_db_flush(); +#endif } } diff --git a/src/bin/e_scale.c b/src/bin/e_scale.c index 15f10f2784..4b869cb1cb 100644 --- a/src/bin/e_scale.c +++ b/src/bin/e_scale.c @@ -93,6 +93,8 @@ e_scale_update(void) e_pointers_size_set(e_config->cursor_size); #ifndef HAVE_WAYLAND_ONLY e_xsettings_config_update(); + snprintf(buf, sizeof(buf), "%i", (int)(75.0 * e_scale)); + ecore_x_resource_db_string_set("Xft.dpi", buf); + ecore_x_resource_db_flush(); #endif } - |