kasper / phoenix

A lightweight macOS window and app manager scriptable with JavaScript
https://kasper.github.io/phoenix/
Other
4.36k stars 128 forks source link

How to make an app fullscreen on top of another app? #270

Closed NightMachinery closed 3 years ago

NightMachinery commented 3 years ago

I am using the code from https://github.com/lukesmurray/bootstrap/blob/master/.phoenix.js to turn some apps into "hotkey popup windows." This works well except that the app's position is always below the menubar: image

I tried using negative numbers for

    mainWindow.setTopLeft({
      x: left,
      y: top,
    });

But it did not work.

mainWindow.setFullScreen(true); is useless as I want the app to open on top of my existing apps, not in its own space.

kasper commented 3 years ago

@NightMachinary Hello! I guess you are you using the automatic hiding of the menu bar? I tried this out and you should be able to do this. Remember that the coordinate system is bottom-left focused (origo), growing as you go. Try Window#maximise() instead (https://github.com/kasper/phoenix/blob/2.6.7/docs/API.md#22-window). Let me know if this helps.

NightMachinery commented 3 years ago

@NightMachinary Weirdly, things just worked using my previous code, without using maximise. I don't know what was the problem.

PS: Does Phoenix store logs somewhere? I like to see the reasons my config has failed to load ...

Thanks!

kasper commented 3 years ago

@NightMachinary Great! Yes, check https://github.com/kasper/phoenix/blob/2.6.7/docs/API.md#logging-and-debugging.