objective c - LSUIElement application that starts a window with an application menu? -


You can click on which opens an NSWindow.

I like it when the window is in focus, the application menu will be displayed. Is this possible?

No, in order to get your app menu, you have to transition the application into a foreground process ( I.e., now an LSUIElement). After transferring application to the foreground, it can no longer return the infection.

The task of transferring applications to the foreground is found in TransformProcessType .

Your choice here 1) After bringing the process with TransformProcessType for forward, adopts a clever little move code and relaunching the application. Your second option is to create a two-level application (this is the option I might keep in favor, if it is possible in your case) where a part of the application is always in the background (i.e., LSUIElement) . When it wants to bring a window with the app menu, it launches a supporting app that includes a window, etc., such as a regular app. When the user is done, that application is rejected and it is closed.

Two applications can easily communicate through any IPC system, including UD sockets, coco distributed objects, NSMS ports, etc.

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -