Skip to content

Fix 64-bit Hyprland window addresses - #38

Open
jacobaross wants to merge 1 commit into
isomerc:masterfrom
jacobaross:fix/hyprland-64-bit-window-ids
Open

Fix 64-bit Hyprland window addresses#38
jacobaross wants to merge 1 commit into
isomerc:masterfrom
jacobaross:fix/hyprland-64-bit-window-ids

Conversation

@jacobaross

Copy link
Copy Markdown

Summary

  • widen the shared EVE window ID type to 64 bits so pointer-sized Hyprland addresses are preserved
  • keep checked conversions at X11/EWMH boundaries, where window IDs are actually 32-bit
  • preserve full Win64 HWND values instead of truncating them through the shared type
  • add regression tests for parsing and round-tripping a Hyprland address larger than u32::MAX

Problem

Hyprland reports client addresses as pointer-sized hexadecimal strings, for example 0x56257ff1ebe0. The current backend parses those values with u32::from_str_radix(...).unwrap_or(0). On typical 64-bit Hyprland sessions the parse overflows, stores window ID 0, and later dispatches focus/stack commands against address:0x0 instead of the EVE client.

Tests

Local on macOS:

  • cargo test --bin Nicotine — 129 passed
  • cargo test --bin Nicotine hyprland_address — 2 passed
  • cargo fmt --check
  • cargo clippy --bin Nicotine -- -A dead-code -D warnings
  • git diff --check

Not run locally:

  • full cargo test — currently reaches the pre-existing Linux-only nix::sys::prctl code in tests/common/unix.rs on macOS
  • Linux integration and Windows lanes — Docker was unavailable

The PR CI matrix should provide Linux unit/integration coverage plus Windows compile, unit, and fake-EVE integration coverage.

@isomerc

isomerc commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Very nice change 👍🏻

One nit before merge though. x11_id() is duplicated, there's a free fn in wayland_backends.rs and an identical X11Manager::x11_id in x11_manager.rs. Worth hoisting a single pub(crate) fn next to the WindowId definition in window_manager.rs and calling it from both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants