1
0
Fork 0
forked from wry/wry

Merge pull request #551 from mahkoh/jorth/layer-shell-positioning

layer-shell: ignore margin for centered surfaces
This commit is contained in:
mahkoh 2025-07-27 16:06:38 +02:00 committed by GitHub
commit 9bfebe4c42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -493,14 +493,14 @@ impl ZwlrLayerSurfaceV1 {
let mut x1 = 0;
let mut y1 = 0;
if anchor.contains(LEFT | RIGHT) {
x1 = (owidth - width - ml - mr) / 2;
x1 = (owidth - width) / 2;
} else if anchor.contains(LEFT) {
x1 = ml;
} else if anchor.contains(RIGHT) {
x1 = owidth - width - mr;
}
if anchor.contains(TOP | BOTTOM) {
y1 = (oheight - height - mt - mb) / 2;
y1 = (oheight - height) / 2;
} else if anchor.contains(TOP) {
y1 = mt;
} else if anchor.contains(BOTTOM) {