Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 976d311f94 |
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1042,7 +1042,7 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
||||
|
||||
[[package]]
|
||||
name = "waydock"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"gtk4",
|
||||
|
||||
@@ -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"
|
||||
|
||||
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 {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user