diff --git a/Cargo.lock b/Cargo.lock index c80314a..c24304d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1042,7 +1042,7 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "waydock" -version = "0.1.2" +version = "0.1.3" dependencies = [ "async-channel", "gtk4", diff --git a/Cargo.toml b/Cargo.toml index bb9fb57..340feb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "waydock" -version = "0.1.2" +version = "0.1.3" edition = "2021" description = "Modern, resurssnål dock för Wayfire — transparent, JSON-konfigurerad, per-skärm" license = "MIT" diff --git a/src/dock.rs b/src/dock.rs index 7fb1d35..b425796 100644 --- a/src/dock.rs +++ b/src/dock.rs @@ -555,11 +555,14 @@ pub fn recompute_dodge(ctx: &Rc) { if x + w <= 0.0 || y + h <= 0.0 || x >= ow || y >= oh { return false; } + // fönstret måste tränga IN i zonen — ett maximerat fönster + // som slutar exakt på docklinjen (reserverad plats) räknas + // inte som överlapp (0.5 px tolerans för avrundning) match position { - Position::Bottom => y + h >= oh - depth, - Position::Top => y <= depth, - Position::Left => x <= depth, - Position::Right => x + w >= ow - depth, + Position::Bottom => y + h > oh - depth + 0.5, + Position::Top => y < depth - 0.5, + Position::Left => x < depth - 0.5, + Position::Right => x + w > ow - depth + 0.5, } }); dock.dodge_overlap.set(overlap);