YaLTeR / niri

A scrollable-tiling Wayland compositor.
https://matrix.to/#/#niri:matrix.org
GNU General Public License v3.0
3.58k stars 105 forks source link

Weird large borders on Slack window #604

Closed minego closed 1 month ago

minego commented 1 month ago

After a recent update, suddenly every time I open Slack, it sizes itself oddly and has very wide borders. My config has normal borders turned off, and the focus-ring border width is set to 1.

The size of the window is clearly smaller in all dimensions than it should be, but I don't see why.

layout {
    gaps 10
    struts {
        left -10
        right -10
        top -10
        bottom -10
    }
    focus-ring {
        width 1
        active-color "faff00"
        inactive-color "0f0f0f"
    }
    border { off; }
}

System Information

Slack when it is active:

image

Slack when it is not the active window:

image

An example of the size any other window takes in the same layout

image

YaLTeR commented 1 month ago

This is probably some chromium issue, I've seen it assume weird sizes until a resize.

minego commented 1 month ago

This is probably some chromium issue, I've seen it assume weird sizes until a resize.

I think there may be something to that... Slack, and electron apps, etc can be ...weird.

That being said, it doesn't change if I resize the window. Regardless of the window size the borders are always like that.

Also, I haven't been able to reproduce it in any other applications so far. Chromium doesn't do it. I haven't tried a lot of other electron apps though.

YaLTeR commented 1 month ago

Looks an awful lot like it sizes the entire buffer (with CSD shadows) to the requested size, instead of just windows contents.

minego commented 1 month ago

Oh, interesting. That does seem plausible. I don't know why that one application would be trying to do that though...

minego commented 1 month ago

Well, I enabled the prefer-no-csd option, and that fixes it. So, it does indeed seem to be caused by client side decorations.

I'm happy with this solution. If you think this is still a bug that should be addressed, feel free to reopen.