Don't force floating panel.

In case of StaysOnTop windows it looks like it is floating already.
But in case of manually setting floating here it has a strange bug
with non-activatable always on top tool window (picture-in-picture).

When first time shown it doesn't act as a stays-on-top window, if you
click on another app it is shown above the PiP. Only if you activate
the main window once more the PiP will become stays-on-top window.

This way it works from the first show.
This commit is contained in:
John Preston 2020-01-29 18:02:15 +03:00
parent 8399f70ea0
commit bbd35238da

View file

@ -43,8 +43,8 @@ void InitOnTopPanel(not_null<QWidget*> panel) {
auto platformPanel = static_cast<NSPanel*>(platformWindow); auto platformPanel = static_cast<NSPanel*>(platformWindow);
[platformPanel setLevel:NSPopUpMenuWindowLevel]; [platformPanel setLevel:NSPopUpMenuWindowLevel];
[platformPanel setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces|NSWindowCollectionBehaviorStationary|NSWindowCollectionBehaviorFullScreenAuxiliary|NSWindowCollectionBehaviorIgnoresCycle]; [platformPanel setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces|NSWindowCollectionBehaviorStationary|NSWindowCollectionBehaviorFullScreenAuxiliary|NSWindowCollectionBehaviorIgnoresCycle];
[platformPanel setFloatingPanel:YES];
[platformPanel setHidesOnDeactivate:NO]; [platformPanel setHidesOnDeactivate:NO];
//[platformPanel setFloatingPanel:YES];
Integration::Instance().activationFromTopPanel(); Integration::Instance().activationFromTopPanel();
} }