Skip to content

fix(macos): accept Option<&ActiveEventLoop> in Host::fn_key and media_keys for stop_showing - #2651

Merged
Hona merged 1 commit into
devfrom
fix/macos-stop-showing-fnkey
Nov 27, 2026
Merged

Hona merged 1 commit into
devfrom
fix/macos-stop-showing-fnkey

Conversation

@Hona

@Hona Hona commented Nov 27, 2026

Copy link
Copy Markdown
Member

Fixes a macOS compile error (E0061) introduced by #2605 (85e5c1830), which added event_loop: &ActiveEventLoop to Host::fn_key and Host::media_keys and updated any_host.rs without updating the #[cfg(target_os = "macos")] call site in Host::stop_showing (crates/rune/src/window/host/lifecycle.rs:987-988).

What changed

  • crates/rune/src/window/host/events.rs: change Host::fn_key and Host::media_keys to accept event_loop: Option<&ActiveEventLoop>, only invoking dispatch_immediate_keyboard when Some(event_loop) is provided.
  • crates/rune/src/window/host/any_host.rs: pass Some(event_loop).
  • crates/rune/src/window/host/lifecycle.rs: pass None from stop_showing(&mut self) (which intentionally requires no ActiveEventLoop, since the window is stopping drawing).

Checks

  • Caught by downstream macOS PR build failure (error[E0061] at lifecycle.rs:987-988, the only 2 errors in rune).
  • Verified diff hygiene and anomalyco/rune PR CI (check and file size). Note that check.yml compiles on Linux; macOS compilation is verified when pinned downstream.

@Hona
Hona merged commit dacf5d8 into dev Nov 27, 2026
2 checks passed
@Hona
Hona deleted the fix/macos-stop-showing-fnkey branch November 27, 2026 16:23
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.

1 participant