fix(macos): build again, and poll the native menu each frame

- app/files.rs called macos_association::repair without the crate::
  path the other callers use. The line only compiles on macOS, so main
  hasn't built there since 2026-11-23 (nightly macOS red, #8595).
- The native menu's events are collected by NativeMenu::poll, and
  nothing called it after the UI port, so the menu bar's clicks and key
  equivalents stayed queued. menus::frame now polls once per frame,
  before set_gate, as craft-menu documents.

Carries the fix from #8166 by @patangay for the v0.23.0 release.

Refs #8595, #8624
Co-authored-by: patangay <176307+patangay@users.noreply.github.com>
This commit is contained in:
FredApps committed 2026-11-28 21:05:52 +01:00
1 parent faebae8ad5
commit 0709c0dc1d
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -476,7 +476,7 @@ impl PdfCraftApp {
}
if let Some(p) = path {
#[cfg(target_os = "macos")]
macos_association::repair(std::path::Path::new(&p));
crate::macos_association::repair(std::path::Path::new(&p));
self.recent.retain(|r| r.path != p);
self.recent_check.opened(&p);
self.recent.insert(0, RecentFile { name: name.to_string(), path: p, pages, size });
+3
View File
@@ -547,6 +547,9 @@ pub(crate) fn frame(app: &mut PdfCraftApp, ctx: &egui::Context) {
}
let gate = Gate::default().modal(gated(app)).text_editing(text_editing(ctx));
let clicks = app.native_menu.as_mut().map(|native| {
// The menu events since the last frame, before the gate as craft-menu asks: clicks wait
// for `take_clicks`, key equivalents become the key presses they were.
native.poll(ctx);
native.set_gate(gate);
native.take_clicks(ctx)
});