Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

"The exclusive zone includes the margin." #42

Open
wmww opened this issue Apr 12, 2019 · 2 comments
Open

"The exclusive zone includes the margin." #42

wmww opened this issue Apr 12, 2019 · 2 comments

Comments

@wmww
Copy link
Contributor

wmww commented Apr 12, 2019

First of all, this is a bit confusing. Should the exclusive zone the client sends include the margin, or does the exclusive zone the server uses include the exclusive zone the client sends + the margin? (sway is currently implemented as the latter)

I can clarify this, but before I do, why is it like this? If I am 20px tall, I'm anchored to the bottom and I want 10 px space below me and 5px above, I would imagine I'd do the following:

layer_surface.set_size(0, 20)
layer_surface.set_anchor(bottom & left & right)
layer_surface.set_margin(0, 0, 10, 0)
layer_surface.set_exclusive_zone(35)

Or, if margin was used by the compositor when calculating exclusive zone:

layer_surface.set_size(0, 20)
layer_surface.set_anchor(bottom & left & right)
layer_surface.set_margin(0, 0, 10, 5)
layer_surface.set_exclusive_zone(20)

However, I instead have to do this (which IMO makes less sense):

layer_surface.set_size(0, 20)
layer_surface.set_anchor(bottom & left & right)
layer_surface.set_margin(0, 0, 10, 0)
layer_surface.set_exclusive_zone(25)
@ammen99
Copy link
Member

ammen99 commented Apr 12, 2019

I think the first thing that you described makes the most sense. I don't see why exclusive zone and margin need to be related.

@emersion
Copy link
Member

emersion commented Nov 1, 2021

wlr-protocols has migrated to gitlab.freedesktop.org. This issue has been moved to:

https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/issues/42

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants