v0.1.3: fönster som nuddar docklinjen räknas inte som överlapp
Maximerade fönster slutar exakt på den reserverade linjen — med >= i overlap-testet gömde dodge docken ändå. Nu krävs att fönstret tränger in i zonen (0.5 px tolerans). Bekräftat av Björn: reservera plats + dodge + maximering beter sig nu som förväntat. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1042,7 +1042,7 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "waydock"
|
name = "waydock"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-channel",
|
"async-channel",
|
||||||
"gtk4",
|
"gtk4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "waydock"
|
name = "waydock"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Modern, resurssnål dock för Wayfire — transparent, JSON-konfigurerad, per-skärm"
|
description = "Modern, resurssnål dock för Wayfire — transparent, JSON-konfigurerad, per-skärm"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
11
src/dock.rs
11
src/dock.rs
@@ -555,11 +555,14 @@ pub fn recompute_dodge(ctx: &Rc<Ctx>) {
|
|||||||
if x + w <= 0.0 || y + h <= 0.0 || x >= ow || y >= oh {
|
if x + w <= 0.0 || y + h <= 0.0 || x >= ow || y >= oh {
|
||||||
return false;
|
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 {
|
match position {
|
||||||
Position::Bottom => y + h >= oh - depth,
|
Position::Bottom => y + h > oh - depth + 0.5,
|
||||||
Position::Top => y <= depth,
|
Position::Top => y < depth - 0.5,
|
||||||
Position::Left => x <= depth,
|
Position::Left => x < depth - 0.5,
|
||||||
Position::Right => x + w >= ow - depth,
|
Position::Right => x + w > ow - depth + 0.5,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dock.dodge_overlap.set(overlap);
|
dock.dodge_overlap.set(overlap);
|
||||||
|
|||||||
Reference in New Issue
Block a user