Live on Windows and plugin window


#1

Since the plugin window does not accept keystrokes on Live on Windows, i created a dumb wrapper that displays just a string saying “this is a dumb wrapper” and displays my plugin as a DocumentWindow on the desktop and the problem is fixed. However Live has a weird issue, when you open your plugin and click on a different track in Live (one of those MIDI track or something) the wrapper disappears (the window that is the actual AudioProcessorEditor) BUT no methods of that window about beeing invisible or anything are called, the same goes for moving/resizing or whatever it’s like that window is dead, and i need to hide my actual DocumentWindow when Live hides the plugin editor buut i can’t cause i don’t know when to do that, there is no information about that, i tried going into the ComponentPeer and fetching some info from Win32 api on the HWND but even that doesnt seem to change when the window “hides”.

Anyone has any idea how to go around this, how to find the state of the AudioProcessorEditor without getting too much into native win32 calls, or maybe even with those calls i’ll add some #ifdefs if needed. I’m just lost as how to do that. I’m using the latest JUCE (always) and Live 8 on Win7.


#2

HA!

i found a way to find the visibility, you need to fetch the peer to see if we’re visible, juce does not provide that info for some reason, i did this in a timer callback (every second) to see what’s going on, when the window hides the WIN32 reports reports correctly however JUCE keeps saying it’s visible. Don’t know if this is a bug or a feature, but if someone would be implementing a wrapper like i did, keep that in mind.

        if (getPeer())
	{
		HWND hwndMsg = (HWND)getPeer()->getNativeHandle();

		if (hwndMsg)
		{
			if (IsWindowVisible(hwndMsg))
			{
				_DBG("WIN32: is visible");
			}
			else
			{
				_DBG("WIN32: is not visible");
			}
		}
	}

	if (isVisible())
	{
		_DBG("JUCE: is visible");
	}
	else
	{
		_DBG("JUCE: is not visible");
	}

#3

Well, the component doesn’t really expect something else to be showing or hiding its window, so doesn’t check on that…


#4

Yeah i know the rule is that the editor get’s deleted, but Live does just hide it and deletes it only when the close button on the OS titlebar is clicked, so i needed a way to find the actual visibility. A lot of people use Live and i had many complaints about that.

Also the moved() method does not get invoked, but when i do getScreenPostion() it changes during the timerCallback() when i move the window around (that’s how i attach my actual DocumentWindow to the plugins editor)