You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Meeting recording capsule won't stay in a new corner after drag (Linux/Windows) #1767
The black recording pill (Meeting — 8:55 AM / elapsed time, screenshotted on Linux) blocks something on screen. I drag it, it follows the pointer, but on release it jumps back to the corner it started in instead of staying where I dropped it.
Why
Capsule::drag (src/rune_ui/meeting_capsules.rs) snaps a released drag with primary_screen_size().map_or(self.corner, ...). On macOS that reads NSScreen; on every other OS it is hardcoded to None, so the fallback is always the starting corner:
/// Linux and Windows leave a dragged capsule in its corner.#[cfg(not(target_os = "macos"))]fnprimary_screen_size() -> Option<(f32,f32)>{None}
So on Linux/Windows the capsule can never move corners — release always snaps back.
Diagnosis for the fix
Linux: the X11 root window size (x11rb::connect + setup().roots, already a dependency) is the screen Rune places the capsule on. XWayland answers for its own root window; on pure Wayland there is no X server, so None (stays in corner) is correct there.
Windows: GetSystemMetrics(SM_CXSCREEN/SM_CYSCREEN) (windows-sys, already a dependency).
The pure snap math (nearest_corner) is already OS-independent and covered by a_released_capsule_snaps_to_the_corner_nearest_its_centre.
Suggested patch
I have this working on a branch with cargo check clean, 26 meeting_capsules tests + 46 labs tests passing, fmt + code-shape clean. Diff sketch:
Happy to post the full diff (4 files: the fix + a stale-comment update in rune_ui/labs.rs + docs/features/{meetings,labs}.md updates) wherever is most useful — per CONTRIBUTING I am not opening a PR.
Activity