Skip to content

fix: activate app before showing Sparkle update dialog#945

Open
arifim wants to merge 1 commit into
jordanbaird:mainfrom
arifim:fix/sparkle-dialog-not-dismissing
Open

fix: activate app before showing Sparkle update dialog#945
arifim wants to merge 1 commit into
jordanbaird:mainfrom
arifim:fix/sparkle-dialog-not-dismissing

Conversation

@arifim
Copy link
Copy Markdown

@arifim arifim commented May 12, 2026

Problem

Ice runs as a background app (LSUIElement = YES), so NSApp.isActive
is false when Sparkle shows the "Check for updates automatically?" dialog.

The buttons animate on click but the dialog never dismisses because
the app is not active and cannot process the response.

Fix

In standardUserDriverShouldHandleShowingScheduledUpdate, activate
the app before returning true so Sparkle can show the dialog properly.

In standardUserDriverWillHandleShowingUpdate, activate the app when
Sparkle is handling the dialog itself (handleShowingUpdate == true).

Fixes

#681 #699 #837 #884

emindeniz99 pushed a commit to emindeniz99/Ice that referenced this pull request May 13, 2026
…a11y amber)

* Updates.swift — when Sparkle wants to show a scheduled update
  prompt while Ice is in the background, activate the app with a
  regular policy and return `true` so the dialog comes up in front
  with key focus. Previously we returned `false` and Sparkle put the
  dialog up anyway, with Ice still .accessory — on macOS 26 the
  window then refused to accept clicks, which is the cluster of
  reports in jordanbaird#912 / jordanbaird#926 / jordanbaird#931 / jordanbaird#932 / jordanbaird#937. Same fix is applied
  to `standardUserDriverWillHandleShowingUpdate` for the
  user-initiated path. (Adapted from arifim's PR jordanbaird#945.)

* PermissionsView.swift — replace plain `.yellow` on the
  "Continue in Limited Mode" button with a darker amber
  (sRGB 0.75/0.45/0). The original failed accessibility contrast
  against the light button background. (Adapted from aramb-dev's
  PR jordanbaird#942 — the asset-catalog refinement in later commits of that
  PR is deferred since the current Xcode-26 sync of the project
  doesn't include the new colorset directory.)

Skipped this round:

* PR jordanbaird#940 (lilaflo) is an 80-commit re-application of
  jordanbaird/macos-26 onto another branch — same commits we
  already carry, nothing new.

* PR jordanbaird#944 (aathanwwt) targets CompactSlider 2.x's removed
  `gestureOptions:` parameter. Package.resolved locks us at 1.2.1
  with the upper bound at <2.0, so the parameter still exists in
  the version we ship.

* PR jordanbaird#941 (lixiaoning) notch-auto-hide. The diff references
  `MenuBarItem.info`, `MenuBarItemTag.iceIcon`,
  `controlItem.state == .hideItems`, and several private flags
  (`isMovingItem`, `isMouseButtonDown`, `tempShownItemContexts`,
  `itemMoveCount`) that don't exist in the macos-26 refactor of
  MenuBarItemManager. Adapting it would mean rewriting the helper
  against a different cache architecture, which I shouldn't do
  without a notched display to verify against. The negative
  windowNumber guard in the same PR is a no-op for us because we
  don't read `NSWindow.windowNumber` anywhere in the macos-26
  branch.
pdurlej added a commit to pdurlej/Ice that referenced this pull request May 24, 2026
Cherry-pick of upstream PR jordanbaird#945 ("activate before Sparkle dialog") had
its `appState.activate(withPolicy: .regular)` line land at 16 spaces of
indent — git's auto-merge added an extra level of nesting that wasn't
in either parent. Surrounding code in the same brace level uses 12.

This was the single violation that broke the lint workflow on the
first run that actually targeted fire/main (we re-pointed the trigger
in cedce26). SwiftLint --strict now passes cleanly with zero
violations across all 104 Swift files.

Verified locally with `DYLD_FRAMEWORK_PATH=/Library/Developer/
CommandLineTools/usr/lib swiftlint --strict --quiet` → exit 0.
pdurlej added a commit to pdurlej/Ice that referenced this pull request May 25, 2026
Cherry-pick of upstream PR jordanbaird#945 ("activate before Sparkle dialog") had
its `appState.activate(withPolicy: .regular)` line land at 16 spaces of
indent — git's auto-merge added an extra level of nesting that wasn't
in either parent. Surrounding code in the same brace level uses 12.

This was the single violation that broke the lint workflow on the
first run that actually targeted fire/main (we re-pointed the trigger
in cedce26). SwiftLint --strict now passes cleanly with zero
violations across all 104 Swift files.

Verified locally with `DYLD_FRAMEWORK_PATH=/Library/Developer/
CommandLineTools/usr/lib swiftlint --strict --quiet` → exit 0.
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