Skip to content

Fix macOS dock tile losing app icon and melt appearing in Dock during export#1807

Merged
ddennedy merged 5 commits intomacos-icon-progressfrom
copilot/sub-pr-1806
Mar 26, 2026
Merged

Fix macOS dock tile losing app icon and melt appearing in Dock during export#1807
ddennedy merged 5 commits intomacos-icon-progressfrom
copilot/sub-pr-1806

Conversation

Copy link
Contributor

Copilot AI commented Mar 26, 2026

Setting a custom NSView as NSDockTile.contentView replaces the system's default rendering, causing the app icon to disappear — leaving only the progress bar on a blank tile. Additionally, when melt runs inside Shotcut.app/Contents/MacOS/ and initializes Qt's Cocoa platform (e.g. for Qt-based MLT filters), Qt registers it as a foreground application, causing a new icon to appear in the Dock during export.

Changes

  • src/macos.mm: In dockProgressBar(), add an NSImageView backed by NSApp.applicationIconImage as the base layer of the custom contentView before adding the NSProgressIndicator on top, so the app icon remains visible while progress is shown.

  • src/jobs/meltjob.cpp: On macOS, set QT_QPA_PLATFORM=offscreen in melt's process environment so it uses Qt's offscreen backend instead of the Cocoa platform, preventing NSApplication registration and keeping melt invisible to the Dock. This is skipped when GPU processing mode is enabled (Settings.playerGPU()), since OpenGL requires the Cocoa platform. Note: libqoffscreen.dylib must be included in the macOS app bundle.

All translation updates must go through transifex.com.
Pull requests for those will be rejected.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] [WIP] Address feedback on job progress and status for dock icon implementation Fix macOS dock tile losing app icon when displaying job progress Mar 26, 2026
Copilot AI requested a review from ddennedy March 26, 2026 17:33
@ddennedy
Copy link
Member

@copilot when doing an export on macOS, a new app icon appears for the background terminal program. How to fix that?

Copy link
Contributor Author

Copilot AI commented Mar 26, 2026

@copilot when doing an export on macOS, a new app icon appears for the background terminal program. How to fix that?

Fixed in commit a041908. When melt runs inside Shotcut.app/Contents/MacOS/ and initializes Qt's Cocoa platform (e.g., for Qt-based MLT filters), Qt calls TransformProcessType to register the process as a foreground application, which gives it a Dock icon. The fix sets QT_QPA_PLATFORM=offscreen in melt's environment on macOS so it uses the offscreen Qt platform instead of Cocoa — this prevents NSApplication registration and keeps melt as a background process with no Dock icon. Note: libqoffscreen.dylib needs to be included in the macOS app bundle for this to take effect.

Copilot AI changed the title Fix macOS dock tile losing app icon when displaying job progress Fix macOS dock tile losing app icon and melt appearing in Dock during export Mar 26, 2026
@ddennedy
Copy link
Member

@copilot The export fails on OpenGL when using GPU processing mode. Do not use the offscreen method when GPU processing mode

Copy link
Contributor Author

Copilot AI commented Mar 26, 2026

@copilot The export fails on OpenGL when using GPU processing mode. Do not use the offscreen method when GPU processing mode

Fixed in commit e6c713a. QT_QPA_PLATFORM=offscreen is now only set when GPU processing mode is disabled — when Settings.playerGPU() is true, the Cocoa platform is used as before so OpenGL remains available.

@ddennedy ddennedy marked this pull request as ready for review March 26, 2026 19:00
@ddennedy ddennedy merged commit 692034e into macos-icon-progress Mar 26, 2026
@ddennedy ddennedy deleted the copilot/sub-pr-1806 branch March 26, 2026 19:00
ddennedy added a commit that referenced this pull request Mar 26, 2026
* Fix macOS dock tile losing app icon and melt appearing in Dock during export (#1807)
* Prevent melt subprocess from appearing in macOS Dock during export
* Skip offscreen Qt platform for melt when GPU processing is enabled on macOS

Co-authored-by: Dan Dennedy <dan@dennedy.org>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.

2 participants