App menu bar remains highlighted permanently when switching app to background

Originator:RichWChan
Number:rdar://48223143 Date Originated:February 19 2019
Status:Open Resolved:
Product:macOS + SDK Product Version:
Classification:Bug Reproducible:Always
 
Area:
AppKit

Summary:
Menu bar remains highlighted permanently if user triggers a menu item; and if the handling logic transitions app to being a background process.

Steps to Reproduce:
(See sample code)
1. user trigger a menu action (e.g. cmd-Q)
2. menu action handler calls `TransformProcessType` with `kProcessTransformToBackgroundApplication`
3. foreground the app again with `TransformProcessType` `kProcessTransformToForegroundApplication`

Expected Results:
The app should behave as a normal foreground app with functional menu bar.

Actual Results:
App menu bar has an item that is permanently highlighted. (See screenshot)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!