Categories
Mac OS Swift R0uter Input Tool

Avoid input candidate article hidden behind other windows

When developing pocketed macOS version of the input method,I encountered such a problem,That is the window priority issues。Before How to make NSWindow displayed in a different Space or the Screen This article I referred to himself realizes candidate field pocketed input method,In fact, with a NSWindow Implementation。So since it is a common (through the magic change) of Window ,Like it and other windows have a priority,That is window.level It determines the relationship between the laminated window displayed on your Desktop,in short,That is, if two windows overlap,High priority will show it to you,The low priority were "blocked" in the back。

Then the question came,This one level How much does this set? Swift is now not show the actual value,Specifically the following statement:

Then we can guess the name - of course proved screenSaver It is the most advanced,That is, screensavers level,This allows the candidate has been displayed in the input field such as roads above the Spotlight。

but,there is a question,If the user is playing a full screen game?

This time the game is that this may also be used screenSaver level,Then you just GG,We must seek a higher level,For example, this is 1000 if,Then we come to a 99999999 Not Miaozai?

of course,This can not be normal window priority in acquiring the,We use this API:

Such candidates in respect of all the windows are always in the top of the。

So is this specific implementation:

Original article written by Gerber drop-off:R0uter's Blog » Avoid input candidate article hidden behind other windows

Reproduced Please keep the source and description link:https://www.logcg.com/archives/2854.html

By R0uter's Blog

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

2 replies on “Avoid input candidate article hidden behind other windows”

Leave a Reply

Your email address will not be published. Required fields are marked *