Open Bug 1716361 Opened 3 years ago Updated 2 years ago

Consider not killing the Dock when pressing the "Pin to Dock" icon on about:welcome

Categories

(Core :: Widget: Cocoa, defect, P3)

defect

Tracking

()

People

(Reporter: spohl, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [mac:integration])

We should consider not killing the Dock when a user presses the "Keep in Dock" icon on about:welcome. This is in contrast to when a user is running Firefox from the DMG, where I believe killing the Dock is the better user experience.

Before we make this change we should test what happens to the Dock's plist. For example, if the user clicks the "Keep in Dock" icon and subsequently makes any changes to the Dock (such as pinning another app), do our changes still persist and become effective after a system restart? Are our changes lost? There are a variety of permutations that could occur and we should get a clear understanding of the behavior before making a decision based on the pros and cons.

Flags: needinfo?(jwatt)

Some notes:

There appears to be Mac internal API OSStatus CoreDockAddFileToDock(CFURLRef url, int) which can add a Dock tile, but the int parameter doesn't appear to be an index unfortunately, so using that wouldn't allow us to pin Firefox next to other browsers or to in-place replace the tile for an existing Firefox that's running from .dmg.

There also appears to be Mac internal API void CoreDockSetPreferences(CFDictionaryRef preferenceDict) - if that can set the 'persistent-apps' array (I haven't gotten to testing that yet) then presumably we wouldn't need to kill the Dock.

Flags: needinfo?(jwatt)
Flags: needinfo?(jwatt)

FWIW the list of CoreDock* functions from the .tbd files (scroll to see them all):

CoreDockAddFileToDock
CoreDockBounceAppTile
CoreDockCompositeProcessImage
CoreDockCopyPreferences
CoreDockCopyWorkspacesAppBindings
CoreDockCreateDragTrashContext
CoreDockDisableExposeKeysIfNecessary
CoreDockGetAutoHideEnabled
CoreDockGetContainerRect
CoreDockGetDashboardInDock
CoreDockGetEffect
CoreDockGetExposeCornerActions
CoreDockGetExposeCornerActionsWithModifiers
CoreDockGetItemDockContext
CoreDockGetItemDockWindow
CoreDockGetMagnificationSize
CoreDockGetMinimizeInPlace
CoreDockGetOrientationAndPinning
CoreDockGetProcessContext
CoreDockGetProcessWindow
CoreDockGetRect
CoreDockGetRectAndOrientation
CoreDockGetRectAndReason
CoreDockGetSpringLoadingTime
CoreDockGetTileSize
CoreDockGetTrashWindow
CoreDockGetWorkspacesCount
CoreDockGetWorkspacesEnabled
CoreDockGetWorkspacesKeyBindings
CoreDockIsDockRunning
CoreDockIsLaunchAnimationsEnabled
CoreDockIsMagnificationEnabled
CoreDockIsSpringLoadingEnabled
CoreDockMinimizeItemWithTitle
CoreDockMinimizeItemWithTitleAsync
CoreDockMinimizeItemsWithTitle
CoreDockMinimizeItemsWithTitleAsync
CoreDockPreventCommunicationWithDock
CoreDockRegisterClientWithRunLoop
CoreDockReleaseDragTrashContext
CoreDockReleaseItemDockContext
CoreDockReleaseItemDockWindow
CoreDockReleaseProcessContext
CoreDockReleaseProcessWindow
CoreDockRemoveItem
CoreDockRenderWindowIntoContext
CoreDockRestoreItem
CoreDockRestoreItemAsync
CoreDockRestoreItemWithOrder
CoreDockRestoreItemWithOrderAsync
CoreDockRestoreProcessImage
CoreDockRevealWindowForShowDesktop
CoreDockSendDragWindowMessage
CoreDockSendNotification
CoreDockSetAutoHideEnabled
CoreDockSetDashboardInDock
CoreDockSetEffect
CoreDockSetExposeCornerAction
CoreDockSetExposeCornerActionWithModifier
CoreDockSetItemTitle
CoreDockSetLaunchAnimationsEnabled
CoreDockSetMagnificationEnabled
CoreDockSetMagnificationSize
CoreDockSetMiniView
CoreDockSetMinimizeInPlace
CoreDockSetOrientationAndPinning
CoreDockSetPreferences
CoreDockSetProcessImage
CoreDockSetProcessLabel
CoreDockSetProcessOpenRecents
CoreDockSetShowDesktopCallback
CoreDockSetSpringLoadingEnabled
CoreDockSetSpringLoadingTime
CoreDockSetSpringWindowCallbacks
CoreDockSetTileSize
CoreDockSetTrashFull
CoreDockSetWindowLabel
CoreDockSetWorkspacesAppBindings
CoreDockSetWorkspacesCount
CoreDockSetWorkspacesEnabled
CoreDockSetWorkspacesKeyBindings
CoreDockUpdateWindow
See Also: → 1729308

I’m working on the equivalent code in Chromium, chrome/browser/mac/dock.mm. This bug looks like the only discussion on CoreDockAddFileToDock so I wanted to note that I just tried calling it and I can’t get it to work on my macOS 11.6 machine, so I’m not sure if it even works any more.

Severity: S2 → S3
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.