3 Commits
Author SHA1 Message Date
swaits e851f3144b chore: repoint URLs at git.swaits.com and bump for release
CI / test (1.85) (push) Canceled after 0s
CI / test (stable) (push) Canceled after 0s
CI / clippy (push) Canceled after 0s
CI / fmt (push) Canceled after 0s
Rewrites remaining github.com / git.sr.ht references to git.swaits.com,
translating GitHub URL shapes to Gitea's (/blob/<ref>/ -> /src/branch/<ref>/,
/tree/<tag> -> /src/tag/<tag>, /actions/workflows/X -> /actions?workflow=X,
/edit/ -> /_edit/).

Left pointing at GitHub on purpose: pull-request links (PRs were not migrated)
and GitHub-only surfaces Gitea lacks (security advisories, discussions).
2026-08-31 17:58:36 -06:00
swaits 0bf4db0d92 chore: point repository at git.swaits.com
CI / test (1.85) (push) Canceled after 0s
CI / test (stable) (push) Canceled after 0s
CI / clippy (push) Canceled after 0s
CI / fmt (push) Canceled after 0s
2026-08-31 17:19:22 -06:00
swaits 3f17a7b632 fix: add focus click with hold time before drag to activate target window
CI / test (1.85) (push) Canceled after 0s
CI / test (stable) (push) Canceled after 0s
CI / clippy (push) Canceled after 0s
CI / fmt (push) Canceled after 0s
2026-04-05 13:27:07 -06:00
4 changed files with 20 additions and 6 deletions

No files matched your search

Generated
+1 -1
View File
@@ -196,7 +196,7 @@ dependencies = [
[[package]]
name = "mousefree"
version = "1.0.2"
version = "1.0.3"
dependencies = [
"anyhow",
"fontdue",
+3 -3
View File
@@ -1,11 +1,11 @@
[package]
name = "mousefree"
version = "1.0.2"
version = "1.0.4"
edition = "2021"
license = "MIT"
description = "Keyboard-driven mouse navigation for Wayland"
repository = "https://github.com/swaits/mousefree"
homepage = "https://github.com/swaits/mousefree"
repository = "https://git.swaits.com/swaits/mousefree"
homepage = "https://git.swaits.com/swaits/mousefree"
readme = "README.md"
keywords = ["wayland", "keyboard", "mouse", "accessibility", "navigation"]
categories = ["command-line-utilities", "accessibility"]
+1 -1
View File
@@ -28,7 +28,7 @@ cargo install mousefree
Or build from source:
```sh
git clone https://github.com/swaits/mousefree.git
git clone https://git.swaits.com/swaits/mousefree.git
cd mousefree
cargo install --path .
```
+15 -1
View File
@@ -43,6 +43,8 @@ const MOD_ALT: u32 = 8;
// Drag animation timing.
const DRAG_SETTLE_MS: u64 = 25;
const DRAG_FOCUS_CLICK_HOLD_MS: u64 = 50;
const DRAG_FOCUS_CLICK_PAUSE_MS: u64 = 500;
const DRAG_PRESS_SETTLE_MS: u64 = 60;
const DRAG_INTERP_STEPS: u32 = 12;
const DRAG_STEP_DELAY_MS: u64 = 2;
@@ -311,11 +313,23 @@ impl WaylandBackend {
self.teardown_surface()?;
let (sw, sh) = (self.state.screen_w, self.state.screen_h);
// 1. Move to the drag origin and let focus settle.
// 1. Click at the drag origin to activate/focus the target window.
// Without this, apps like zellij ignore the drag because the
// surface isn't activated yet.
self.send_motion(x1, y1, sw, sh)?;
self.roundtrip("motion to drag start")?;
sleep(Duration::from_millis(DRAG_SETTLE_MS));
self.send_button(BTN_LEFT, ButtonState::Pressed)?;
self.roundtrip("focus click press")?;
sleep(Duration::from_millis(DRAG_FOCUS_CLICK_HOLD_MS));
self.send_button(BTN_LEFT, ButtonState::Released)?;
self.roundtrip("focus click release")?;
// Wait past the double-click window so the focus click and the
// upcoming press-and-hold are never interpreted as a double-click.
sleep(Duration::from_millis(DRAG_FOCUS_CLICK_PAUSE_MS));
// 2. Press and hold — give the app time to register the press.
self.send_button(BTN_LEFT, ButtonState::Pressed)?;
self.roundtrip("press at drag start")?;