tudurom / windowchef

Window Chef is a stacking window manager that cooks windows with orders from the Waitron
https://tudorr.ro/software/windowchef/
ISC License
203 stars 14 forks source link

Internal border not working #71

Closed jakkkko closed 3 years ago

jakkkko commented 3 years ago

It looks like after commit d7d7a97766e939f5ba5bbfec6f7c5a4c30031e0a the internal border is not working anymore. On the commit before that one it works. My border config:

waitron wm_config border_width 5
waitron wm_config internal_border_width 2
waitron wm_config color_focused 0x393638
waitron wm_config color_unfocused 0x393638
waitron wm_config internal_color_focused 0x97a293
waitron wm_config internal_color_unfocused 0x393638

I also tried with the config in examples/ but that didn't work either.

jakkkko commented 3 years ago

Right now I'm just doing

diff --git a/wm.c b/wm.c
index d394bb9..1c4fa1b 100644
--- a/wm.c
+++ b/wm.c
@@ -1709,8 +1709,8 @@ set_borders(struct client *client, uint32_t color, uint32_t internal_color)
                return;
        uint32_t values[1];

-       color = get_color_pixel(color);
-       internal_color = get_color_pixel(color);
+       /* color = get_color_pixel(color);
+       internal_color = get_color_pixel(color); */

        values[0] = conf.border_width;
        xcb_configure_window(conn, client->window,

and it works.

LavenderPerry commented 3 years ago

I think this way is better because it keeps the calls to get_pixel_color:

@@ -1710,7 +1710,7 @@ set_borders(struct client *client, uint32_t color, uint32_t internal_color)
    uint32_t values[1];

    color = get_color_pixel(color);
-   internal_color = get_color_pixel(color);
+   internal_color = get_color_pixel(internal_color);

    values[0] = conf.border_width;
    xcb_configure_window(conn, client->window,

If those calls were removed it would undo some of the changes in d7d7a97. I created a pull request (#72) because I tested it and this did fix the internal border.

tudurom commented 3 years ago

Oops, I think this was an error caused by mindless copying and pasting. Thank you for reporting and fixing the issue!