wayland/layer: Exclusive edge fix, protocol version 5, arrange order#1819
Conversation
984cd7a to
223ac50
Compare
223ac50 to
9668eae
Compare
|
Looks like the handling of the edge for exclusive zones there isn't quite right already. x if x.contains(Anchor::TOP) && x.contains(Anchor::BOTTOM) => {
zone.size.w -= amount;
if x.contains(Anchor::LEFT) {
zone.loc.x += amount;
zone.loc.x += data.margin.left;
zone.size.w -= data.margin.left;
}
if x.contains(Anchor::RIGHT) {
zone.size.w -= data.margin.right
}
}This case appears before the We could have a function to determine the exclusive edge, if any. And also add support for version 5 of the protocol supporting an explicit exclusive edge: https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/merge_requests/123 |
9668eae to
3290055
Compare
arrange(), handle exclusive zone surfaces firstarrange order
This simplifies the match for anchors, and should correct the behavior for things like anchoring all edges. I believe previously the `x == Anchor::all()` case would never be reached, since the `x.contains(Anchor::TOP) && x.contains(Anchor::BOTTOM)` condition would also be true. Also the behavior is wrong; the spec says to treat this like `ExclusiveZone::Neutral`. This should now behave as defined by the spec.
Use the exclusive edge provided by the request if present. Otherwise, fallback to the implied edge based on anchors.
Iterate over surfaces that have an exclusive zone first, then other surfaces. This allows a surface that doesn't have an exclusive zone to be moved or resized for a later surface that does have an exclusive zone. As is probably desired.
3290055 to
82f830d
Compare
|
The Before this change, the workspaces view didn't resize to make space for the panel. After this change, it does. |
| _ => unreachable!(), | ||
| }), | ||
| _ => unreachable!(), |
There was a problem hiding this comment.
Is this value guaranteed to be valid, or parsed from the client unchecked? If the former, perhaps add a comment here?
There was a problem hiding this comment.
Looking at this part again, I guess we want another check here, if the client tried to set multiple edges for the exclusive edge: #1849
Updates for `last_acked`, etc. API changes in Smithay/smithay#1817. Includes layer shell fixes from Smithay/smithay#1819.
Updates for `last_acked`, etc. API changes in Smithay/smithay#1817. Includes layer shell fixes from Smithay/smithay#1819.
Updates for `last_acked`, etc. API changes in Smithay/smithay#1817. Includes layer shell fixes from Smithay/smithay#1819.
Iterate over surfaces that have an exclusive zone first, then other surfaces. This allows a surface that doesn't have an exclusive zone to be moved or resized for a later surface that does have an exclusive zone. As is probably desired.
This does help with a test client, but not with the client I was trying to fix; so I need to do a bit more testing here...