Plugin window visibility check on macOS - Silicon

I have a problem when checking if plugin window is visible on macOS (Silicon).

On Windows i use this (Windows API) successfully:

isWindowVisible ((HWND) getWindowHandle());

On macOS, getWindowHandle() returns NSView*, so i’ve checked several related properties of NSView and its NSWindow, without success. Result is always true, regardless of actual visibility of plugin window in host.

Anyone knows a reliable way of checking it, am i missing something?

Thanks!

1 Like

I thought isShowing() would do that job.
Other than isVisible() this tests all in the hierarchy, if they are indeed showing (and I would expect to check the HeavyWeight Peer too).
Did you try that one?

Now that you’ve mentioned it, i’ll double check these methods again. As i remember isVisible() wasn’t working even on Windows, so i replaced it with IsWindowVisible() API.

Thx!

Yes, isVisible just checks the visible flag of that one component. If any parent is invisible it returns true despite not being shown.

I can confirm that on Windows isShowing() works properly!

Problem remains the same on macOS Silicon. isShowing() doesn’t help.

Several hosts on Silicon are sometimes hiding plugin window without destroying editor, so i have to check visibility of the main plugin window to be able to handle other GUI elements properly. This wasn’t a case on Catalina for example, at least not with LogicX !?

My project is using JUCE4, so hopefully isShowing() was fixed/changed with newer JUCE versions. I’ll create dummy plugin with latest JUCE to check.

Any other ideas or hints would be greatly appreciated.

Sounds similar to the issue reported in this thread:

On my side, story started with Ableton Live VST3 on Windows. If project was saved with editor opened, at next project open, plugin window is closed without destroying editor. So, next open of the plugin window will show editor (not create, because it already exists) and then all further closing/opening will destroy/create editor as expected.

I had a discussion with Live developers, but they were not willing to dig into this at that time. By their words, if every other plugin can handle this, i shoud also. I think Bitwig behaves in a similar way, haven’t checked it in detail, yet.

Now the story continues with LogicX on Silicon. According to link you’ve published, JUCE version is not relevant.

Now the question still remains - why isShowing() is not working as expected on Silicon LogicX …

Another one related …

Did a lot of debugging and experimenting … isShowing() is definitively not working for this scenario (Silicon).