setUsingNativeTitleBar makes OpenGLComponent disappear


When I try to go kiosk on the Mac, I’m still left with the windows native title bar. I tried to turn off the native bar, and set the bar hight to zero, and it works, but OpenGLComponents seem to disappear.

I do have a fairly customized OpenGLComponent, it’s fair to say, but it’s completely derived from the juce one.

Is there some windows linkage that gets broken? Is a non-native title-bar window actually a completely new window?



Yes - things like the title bar can only be chosen when a window is created, so if you modify it, the component will delete the old window and re-attach itself to a new one, so unless your embedded window can deal with a change of parent, you could get into trouble. The component will send a ‘hierarchy changed’ message to its listeners when this happens, so it’s possible to work around it.

Or just make sure that your window flags are all correct before creating your subcomponent.


Well, I don’t want to change the titlebar, but it’s not really fullscreen or kiosk without it.

My component is an OpenGLComponent subclass. Does that suffer the same problem?

My overrides are:

[code] Constructor and Destructor,
void newOpenGLContextCreated ();
void showOnDestop (const Rectangle &screenSpace);

void	visibilityChanged ();

bool	renderAndSwapBuffers ()			{ return true; }	// Override to prevent juce drawing
void	renderOpenGL ()					{ return; }			// Overide juce

void	resized();
void	mouseMove(const MouseEvent& e);


Would hooked back to any of those help?



The openglcomp uses the ComponentMovementWatcher::componentPeerChanged callback to catch this sort of thing, so I’d have expected it to cope with this. Maybe your subclass also needs to use that callback to do update something.