mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-27 16:09:34 +01:00
On macOS 27 an auto-hidden menu bar leaves an invisible window in its place, as high as the camera housing, and that window takes every click made there. The strip beside the housing is that place, so a click on a tab or a toolbar button in the top row brought the menu bar in and never reached the page. Hovering still worked. Seen on a MacBook Pro (Mac17,13, macOS 27.2.1), with a plain AppKit window as much as with the app. The Dock and the menu bar are now fully hidden while the pointer is over the page, which leaves nothing of macOS at the top, and only auto-hide once the pointer touches the top edge of the display or the edge the Dock is on, so pushing against an edge still slides the bar in. They go back to hidden when the pointer has moved clear of the bar, and never while a menu is open. A timer follows the pointer while a window is in the mode and the app is in front: the app gets no mouse events over the menu bar, the Dock or macOS's own window. The rule is a pure function (`reach`, `hiding`, `presentation_step`) with unit tests, among them that no step sets a combination AppKit refuses. Seen on that MacBook with this build: pointer clicks on tabs and on the settings button in the top row, the menu bar and the Dock sliding in at their edges and leaving again, a menu staying open while the pointer moves down it, and the same after the option was turned off and on, after another app was in front, and after a relaunch. The pointer was driven by synthetic events. The same round covered what the second build still owed: the option on with no setting stored, the switch in App Settings both ways, and typing right after the change into the whole display from the View menu and from the switch. All held. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
105 lines
3.0 KiB
TOML
105 lines
3.0 KiB
TOML
[package]
|
|
name = "codeman-desktop"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.90"
|
|
description = "Codeman Desktop: a small native window for a Codeman server"
|
|
license = "MIT"
|
|
publish = false
|
|
|
|
[[bin]]
|
|
name = "codeman-desktop"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
# Window + event loop (tao), the system web view (wry: WKWebView on macOS,
|
|
# WebView2 on Windows, WebKitGTK on Linux) and native menus (muda). Tauri is
|
|
# built on these three; using them directly keeps the app small and gives us
|
|
# `load_url_with_headers`, which Tauri's navigate() does not have (see README).
|
|
tao = "0.37"
|
|
wry = { version = "0.57", features = ["devtools"] }
|
|
muda = "0.21"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
url = "2"
|
|
# The versions ureq and wry already pull in, so neither crate is built twice
|
|
# (ureq builds base64 without its default SIMD engines, and so do we).
|
|
base64 = { version = "0.23", default-features = false, features = ["std"] }
|
|
dirs = "7"
|
|
# The reachability probe. platform-verifier = the OS trust store, the same one
|
|
# WKWebView uses, so the probe and the window agree on which certificates pass.
|
|
ureq = { version = "3", features = ["platform-verifier"] }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
security-framework = "3"
|
|
# Ignoring signals in the logo blinker (src/logo.rs). Already in the tree
|
|
# through wry and tao, so no new crate is added.
|
|
libc = "0.2"
|
|
# JavaScript dialogs, HTTP Basic challenges, clearing cookies and the window's
|
|
# content size (src/macos.rs), and full screen over the whole display
|
|
# (src/whole_screen.rs). The versions wry already pulls in, so no new crate is
|
|
# added.
|
|
objc2 = { version = "0.6.5", default-features = false, features = ["std"] }
|
|
block2 = { version = "0.6.2", default-features = false, features = ["std"] }
|
|
objc2-foundation = { version = "0.3.2", default-features = false, features = [
|
|
"std",
|
|
"objc2-core-foundation",
|
|
"block2",
|
|
"NSArray",
|
|
"NSBundle",
|
|
"NSDate",
|
|
"NSDictionary",
|
|
"NSGeometry",
|
|
"NSNotification",
|
|
"NSObject",
|
|
"NSOperation",
|
|
"NSProcessInfo",
|
|
"NSRange",
|
|
"NSSet",
|
|
"NSString",
|
|
"NSTimer",
|
|
"NSURL",
|
|
"NSURLAuthenticationChallenge",
|
|
"NSURLCredential",
|
|
"NSURLProtectionSpace",
|
|
"NSURLRequest",
|
|
"NSURLResponse",
|
|
"NSURLSession",
|
|
"NSUserDefaults",
|
|
"NSValue",
|
|
] }
|
|
objc2-app-kit = { version = "0.3.2", default-features = false, features = [
|
|
"std",
|
|
"objc2-core-foundation",
|
|
"NSAlert",
|
|
"NSApplication",
|
|
"NSButton",
|
|
"NSControl",
|
|
"NSEvent",
|
|
"NSMenu",
|
|
"NSResponder",
|
|
"NSScreen",
|
|
"NSTextField",
|
|
"NSView",
|
|
"NSWindow",
|
|
] }
|
|
objc2-web-kit = { version = "0.3.2", default-features = false, features = [
|
|
"std",
|
|
"block2",
|
|
"objc2-app-kit",
|
|
"WKFrameInfo",
|
|
"WKNavigationDelegate",
|
|
"WKSecurityOrigin",
|
|
"WKUIDelegate",
|
|
"WKWebView",
|
|
"WKWebsiteDataRecord",
|
|
"WKWebsiteDataStore",
|
|
] }
|
|
|
|
[profile.release]
|
|
opt-level = "s"
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = true
|
|
panic = "abort"
|