Set a windows to Front

I got an external process that runs my actual code, and that I want the windows to be on front of everything. On Windows I just use: BringWindowToTop((HWND)) and works great. toFront() doesn’t work on either OSX and Windows. Always On Top works, but I don’t like it as it stays on top of other stuff too. So it would be nice to find an alternative for OSX. Any ideas? Thanks! :slight_smile:

Cheers, WilliamK

I can’t find toFront() OSX code. On Windows it will call SetForegroundWindow which is not setting the window to the top-most one. Using BringWindowToTop works much better.

Also, to detect if the main window is minimised or not visible, I use:

if (IsIconic((HWND)getWindowHandle())) …

if (!IsWindowVisible((HWND)getWindowHandle())) …

I tried creating a .mm file (Objective C) and using some OSX code to mess up with the window but it crashed right away. I have to check what I used, don’t remember.