From fa0608b50fb641517fd4cb51d93a734d47931658 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 1 Aug 2019 13:47:30 +0100 Subject: [PATCH] tiling - use a tiling specific border if it exists in theme and cfg if you set cfg not ot use nomral borders then use "tiling" if it exists instead of "pixel" as thats probably the right thing to do... --- src/modules/tiling/e_mod_tiling.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index a0e33f206..62c6e29d0 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -567,24 +567,23 @@ _desk_config_apply(E_Desk *d, int old_nb_stacks, int new_nb_stacks) static void _client_apply_settings(E_Client *ec, Client_Extra *extra) { - if (!extra) - { - extra = tiling_entry_func(ec); - } + const char *bdname = "pixel"; - if (!extra || !extra->tiled) - return; + if (!extra) extra = tiling_entry_func(ec); - if (ec->maximized) - _e_client_unmaximize(ec, E_MAXIMIZE_BOTH); + if ((!extra) || (!extra->tiled)) return; - if (!tiling_g.config->show_titles && (!ec->bordername || - strcmp(ec->bordername, "pixel"))) - change_window_border(ec, "pixel"); - else if (tiling_g.config->show_titles && (ec->bordername && - !strcmp(ec->bordername, "pixel"))) - change_window_border(ec, (extra->orig.bordername) ? extra->orig.bordername : "default"); + if (ec->maximized) _e_client_unmaximize(ec, E_MAXIMIZE_BOTH); + if (e_theme_border_find("tiling")) bdname = "tiling"; + + if ((!tiling_g.config->show_titles) && + (!ec->bordername || strcmp(ec->bordername, bdname))) + change_window_border(ec, bdname); + else if ((tiling_g.config->show_titles) && + (ec->bordername && !strcmp(ec->bordername, bdname))) + change_window_border(ec, (extra->orig.bordername) ? + extra->orig.bordername : "default"); } static void