diff --git a/CHANGELOG.md b/CHANGELOG.md index fc6ce16..0cc999e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 0.1.1 (2026-04-07) + +### Bug Fixes + +- Remove 10-second auto-exit timer; overlay now runs until toggled off +- Smooth cursor tracking by reducing input hole from 512px to 48px + ## 0.1.0 (2026-04-07) Initial release. diff --git a/Cargo.toml b/Cargo.toml index 4325f63..633aacc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ringa" -version = "0.1.0" +version = "0.1.1" edition = "2021" license = "MIT" description = "GPU-rendered ring light overlay for Wayland" diff --git a/src/main.rs b/src/main.rs index 36b50a8..fd01f25 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,6 @@ use lock::ToggleResult; use render::GpuRenderer; use wayland::{OverlayEvent, WaylandBackend}; -const DISPLAY_DURATION: Duration = Duration::from_secs(10); const FRAME_INTERVAL: Duration = Duration::from_millis(16); fn main() -> Result<()> { @@ -37,19 +36,16 @@ fn main() -> Result<()> { color, )?; - // Initial cursor offscreen — will update when pointer enters ring zone. let mut cursor_x = -10000.0_f64; let mut cursor_y = -10000.0_f64; renderer.render(cursor_x, cursor_y)?; - let start = Instant::now(); let mut last_draw = Instant::now(); let mut dirty = false; loop { - let elapsed = start.elapsed(); - if elapsed >= DISPLAY_DURATION || lock::should_exit() { + if lock::should_exit() { break; } @@ -59,13 +55,10 @@ fn main() -> Result<()> { dirty = false; } - let remaining = DISPLAY_DURATION - elapsed; let poll_timeout = if dirty { - FRAME_INTERVAL - .saturating_sub(last_draw.elapsed()) - .min(remaining) + FRAME_INTERVAL.saturating_sub(last_draw.elapsed()) } else { - remaining + Duration::from_secs(1) }; let event = match wl.next_event(poll_timeout)? { @@ -77,8 +70,6 @@ fn main() -> Result<()> { OverlayEvent::CursorMoved(x, y) => { cursor_x = x; cursor_y = y; - // Punch a passthrough hole at the new cursor position so - // clicks go to the desktop, then re-render the shader. wl.update_cursor_hole(cursor_x, cursor_y)?; dirty = true; } diff --git a/src/wayland.rs b/src/wayland.rs index f67b3f2..3e76034 100644 --- a/src/wayland.rs +++ b/src/wayland.rs @@ -25,9 +25,9 @@ use raw_window_handle::{ RawDisplayHandle, RawWindowHandle, WaylandDisplayHandle, WaylandWindowHandle, }; -/// Size of the passthrough hole around the cursor. Should be large enough -/// that normal mouse movement stays within the hole between frames. -const CURSOR_HOLE_SIZE: i32 = 512; +/// Size of the passthrough hole around the cursor. Small = more frequent +/// pointer events = smoother tracking. Clicks land inside this hole. +const CURSOR_HOLE_SIZE: i32 = 48; pub enum OverlayEvent { Close,