wmww / gtk-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol
GNU General Public License v3.0
324 stars 16 forks source link

Do exclusive zones work if the window in question has a margin? #168

Closed spl237 closed 1 year ago

spl237 commented 1 year ago

I'm doing some work with setting margins and anchors on a panel to space it from the sides of the screen, and it seems to make the exclusive zone set for the panel behave oddly.

I have auto_exclusive_zone_enable set for a panel. If I anchor it to the top or the bottom of the screen with no margin, it seems to work correctly, pushing other windows down or up as expected.

But if I set both an anchor and a margin, it doesn't seem to work, or at least not in a consistent fashion; I get different behaviour at top and bottom of the screen, for a start.

Before I do any more investigation, is it just that exclusive zones are not intended to work for windows which have both a margin and an anchor set, and will only work if the window is directly anchored to an edge without a margin?

wmww commented 1 year ago

Hey, sorry for the wait. Then intention of the API is that (when auto exclusive zones are used) margin can be used to control the size of the exclusive zone to be bigger or smaller than the surface. Play around with gtk4-layer-demo to see exactly how it works.