We have a pair of co-operating applications. The standard one maintains the main menu; there's also a login item (installed through +[SMAppService loginItemServiceWithIdentifier:]), which has its own GUI. To the user, both are presented as one application: very often, a login item's window is active while the standard app's main menu is presented (since login items cannot own the menu bar).
Normally it works all right. Nevertheless, when the main menu is hidden (System Settings / Control Center / Automatically hide and show the menu bar: Always), sometimes (intermittently) it does not show. We have ascertained that the setup is all right, i.e.,
the login item is the current app all right (by our own logs; also, NSWorkspace.sharedWorkspace.frontmostApplication of an independent application shows our login item)
the standard application owns the menu (again, by our logs, and NSWorkspace.sharedWorkspace.menuBarOwningApplication of an independent code shows our standard app).
Yet, when the user brings the pointer to the top of the screen, nothing happens. Notably, when menu is not hidden, the proper menu bar (of the standard application) is shown all the time.
Does anybody know what to do to fix the problem?
Topic:
App & System Services
SubTopic:
General