There doesn’t seem to be a callback for when a window is restored after being minimized to the Taskbar (Windows) or Dock (OSX). Am I missing something?
Never mind, I found it. Didn’t think to look in the Component class.
Actually, it looks like this is working for Windows, but not for OS X. Bug perhaps?
Specifically I should say that I’m talking about the minimisationStateChanged() function. It gets called on Windows but not OS X.
This seems to fix it, in juce_mac_NSViewComponentPeer.mm:
if (! owner_->isSharedWindow)
{
[notificationCenter addObserver: self
selector: @selector (frameChanged:)
name: NSWindowDidMoveNotification
object: owner_->window];
// added these two lines:
[notificationCenter addObserver: self
selector: @selector (frameChanged:)
name: NSWindowDidMiniaturizeNotification
object: owner_->window];
[notificationCenter addObserver: self
selector: @selector (frameChanged:)
name: NSWindowDidDeminiaturizeNotification
object: owner_->window];
}
Ok, thanks! I’ll take a look at that…