> On Sep 13, 2017, at 9:04 AM, James Walker <[email protected]> wrote:
> 
> On 9/13/2017 6:51 AM, Andreas Falkenhahn wrote:
>> On Cocoa, I can just do the following to have my window appear above all 
>> other
>> windows:
>> 
>>    [win setLevel:NSFloatingWindowLevel];
>> 
>> Is there any Carbon equivalent for this? I've tried to use 
>> kFloatingWindowClass
>> and kUtilityWindowClass but they don't do quite the same because they make 
>> the
>> window appear with a smaller, non-standard window frame and they also prevent
>> window activation whereas when using
>> 
>>    [win setLevel:NSFloatingWindowLevel];
>> 
>> windows appear with the default frame and can also be activated.
>> 
> 
> Have you looked through MacWindows.h?  In theory, I think you could create a 
> window group, add your window to the group, and then use SetWindowGroupLevel.

Yes, that should do it. More specifically, I suggest rather than using 
SetWindowGroupLevel, you position your custom window group above the 
system-provided group for kUtilityWindowClass:

[typed in mail, not compiled]

WindowGroupRef group;
CreateWindowGroup( kNilOptions, &group );
SendWindowGroupBehind( group, GetWindowGroupSibling( GetWindowGroupOfClass( 
kUtilityWindowClass ), false ) );

That should keep the windows in your group at a window level high enough to 
float over all other windows, including of other applications.

-eric

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/carbon-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to