Repository navigation
Conversation
|
@frypan05 I tested #142 (d89df68) on the two side-by-side screens from #85: 2560×1440 at 125% on the left, 1920×1080 at 100% on the right, 182 px lower. First the merge with main, which needs fixing before anything else. Merge with main
Autohide at the side edges With the build fixed, I glided the pointer into each edge with
Jumping across the shared edge in a single move didn't bring the dock up (0 of 5 for each side), which is right. The dock is 70 px wide at 125% and 56 px at 100%. Left edge holds one pixel inside the screen At the right edge the pointer is held on the screen's last pixel (2559). At the left edge it's held one pixel in, at 2561 instead of 2560.
This test fails on d89df68 on both asserts: #[test]
fn left_side_edge_holds_on_the_seam_pixel() {
use windows::Win32::Foundation::{POINT, RECT};
let monitors = [
RECT { left: -1920, top: 0, right: 0, bottom: 1080 },
RECT { left: 0, top: 0, right: 1920, bottom: 1080 },
];
let held = edge_hold(Edge::Left, &monitors, POINT { x: 8, y: 600 }, POINT { x: -8, y: 610 }, 400..800, false);
assert_eq!(held.map(|p| p.x), Some(0), "held at");
let from_seam = edge_hold(Edge::Left, &monitors, POINT { x: 0, y: 600 }, POINT { x: -8, y: 610 }, 400..800, false);
assert!(from_seam.is_some(), "a sample on the seam pixel x=0 slips through");
}Mirroring points with x → −1 − x and turning each rectangle through its last pixel inside fixes both. The full suite still passes, and on my screens the hold then lands on 2560: let turn = |point: POINT| match edge {
Edge::Left => POINT {
x: point.y,
- y: -point.x,
+ y: -1 - point.x,
},
_ => POINT { x: point.y, y: point.x },
};
let back = |point: POINT| match edge {
Edge::Left => POINT {
- x: -point.y,
+ x: -1 - point.y,
y: point.x,
},
@@
- let b = turn(POINT {
- x: rect.right,
- y: rect.bottom,
- });
+ // Turn the last pixel inside, not the exclusive corner, so the
+ // turned rectangle covers exactly the same pixels.
+ let b = turn(POINT {
+ x: rect.right - 1,
+ y: rect.bottom - 1,
+ });
RECT {
left: a.x.min(b.x),
top: a.y.min(b.y),
- right: a.x.max(b.x),
- bottom: a.y.max(b.y),
+ right: a.x.max(b.x) + 1,
+ bottom: a.y.max(b.y) + 1,
}Still to check: the space kept for maximized windows, autohide off, and switching between bottom, left and right while Wisp runs. I'll add those here. |
|
@RayTrunk I believe the error came from a bad merge resolution. The popup size was being DPI-scaled twice. Once you're through with the tests, I'll take up the above insights and update accordingly. |
|
@frypan05 Thanks. Here are the rest of the results, again on d89df68 with the duplicate line removed. Everything here passed. Autohide off, switching edges while Wisp runs. I started with the dock at the bottom of the main screen and the taskbar hidden. Then I changed
I didn't maximize a real window. I relied on the work area, which is what Windows uses to size one. |
|
@RayTrunk thanks for tests. I've addressed the points you mentioned.
Verified: |
|
@frypan05 Retested af3d8b4 on the same two screens. All good:
Two notes:
|
af3d8b4 to
15e0ca9
Compare
|
@RayTrunk Hi, I rebased onto current Local checks pass:
I also retested the side-dock previews, dock-off launcher hiding, left seam hold, autohide at shared/outer edges, live edge switching/work area, and The rebased branch is pushed. Please rerun CI on the updated branch. |
|
@frypan05 Thanks. I checked 15e0ca9:
I can't rerun CI on your PR myself, and GitHub shows no checks for this branch yet. @SumirSeth, could you start or approve the CI run for 15e0ca9? |
|
sure, done. |
Fixes: #85 for side edges; no option for Top ATM.
What changed
dock_edge = "bottom" | "left" | "right", withbottomas the default.ms-actioncenter:, matching the bottom clock. The old side-clock date expansion was removed.Why
The dock was fixed to the bottom edge. This lets users place it on the left or right without breaking the launcher or app animations, which should grow from and shrink to the same edge as the dock.
How I verified it
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo clippy --workspace --all-targets --features wisp/nightly,wisp/perf-trace -- -D warningscargo test --workspace: 280 passed, 0 failed, 4 ignoredAll done on Windows 11 Pro, 100% and 125% scaling, dock mode: bottom and right/left.
Performance
CPU/memory summary:

span durations:

Not tested
Fixes #
Unreleased, or this has nothing users notice.Note: This PR is just for testing the side dock implementation. Once tested thoroughly, I'll squash the commits with a final push keeping the code cleanliness in place. @SumirSeth