Repository navigation
Conversation
Assisted-By: GPT-5, Codex
|
💖 Thanks for opening this pull request! 💖 Semantic PR titlesWe use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Commit signingThis repo enforces commit signatures for all incoming PRs. PR tipsThings that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
4 of 5 tasks
zoolsher
added a commit
to rome-os/rome
that referenced
this pull request
Oct 23, 2026
…1281) ## What this PR does On macOS 26.6, every press on the floating icon activates Rome. Becoming active hides the icon, so a trackpad drag (three-finger or press-and-drag) never starts. Rome comes to the front instead. A click looked fine only because activation raises Rome anyway. The icon's page never received the press. The cause is [electron/electron#53889](electron/electron#53889). Electron's `type: "panel"` window reports the non-activating style from its `styleMask` getter but never sets it, so the window server activates the app on the press. The issue reports this on macOS 27, which is why #462 keeps the icon off there. A trace on macOS 26.6.2 shows the same thing for trackpad presses. The upstream fix ([electron/electron#54807](electron/electron#54807), open) applies only to macOS 27. This sets AppKit's `_setPreventsActivation:` on the icon's window once, through koffi, before the window is shown. ## Design & Invariants - Pressing, clicking or dragging the icon leaves the frontmost app frontmost. Only a click raises Rome, through the icon's own click handling. - The private method is called only after `respondsToSelector:` confirms it exists. If a macOS release drops it, the icon goes back to activating Rome, Rome logs a warning, and nothing crashes. - The native FFI module loads only when the icon window is created, which happens only on macOS. Other platforms never open it. - The packaged app carries koffi's loader and its two macOS binaries (2.8 MB), not its sources or the other platforms' binaries (29 MB). Considered and rejected: a small native addon in the repo, which adds a native build step for one message send; and turning the icon off on macOS 26.6 and later until upstream ships a fix, which removes the feature. ## Test plan - [x] macOS 26.6.2, real trackpad, debug build with event logging: before the change, a click, a three-finger drag and a press-and-drag each logged an app activation and no `pointerdown`. After it, 11 of 11 drags were recognized as drags with no activation, and a click opened Rome through the icon's click handler. - [x] Unpacked dev build, synthetic mouse drags with Finder frontmost: the icon follows the cursor exactly and Finder stays frontmost. - [x] Packaged unsigned `.app` (`electron-builder --dir`): koffi loads from `app.asar.unpacked`, 3 of 3 drags move the icon with Finder frontmost, and a click brings Rome to the front. - [x] Unit tests: the flag is set, and nothing is sent when the method is missing or the view has no window. - [ ] Signed and notarized build. The existing entitlements already allow unsigned executable memory and disable library validation. Exercised on a MacBook (macOS 26.6.2, Electron 44.9.3) with a separate profile. Synthetic drags were posted as CGEvents. ## Not in this PR - macOS 27 stays off in `supportsFloatingPill`. This fix may cover it too, but it has not been run there. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Merged
5 of 9 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Fixes #53889.
On macOS 27, clicking a non-focusable BrowserWindow created with
type: 'panel'can activate the Electron app. This applies the AppKit panel activation-prevention hook when Electron creates the native panel, and adds a regression spec that uses real OS mouse input to verify the panel receives a click while Electron remains inactive.Checklist
npm testpassesRelease Notes
Notes: Fixed panel windows activating their app on macOS 27.
Testing
git show --check HEAD