Kiosk Mode in Leopard


#1

XCode 4.6. As long as I set my deployment target to 10.6 or higher, kiosk mode works. But if I set it to 10.5, it doesn’t. The component that is supposed to be put into kiosk mode is added to the desktop (from a previous addToDesktop call), but isn’t expanded into full screen, nor does the menubar disappear, etc. The only thing that does happen is a breakpoint called EXC_I386_BPT is triggered at the end of the setKioskComponent method. It then lets me continue, but no kiosk mode. I looked up EXC_I386_BPT but I’m having a hard time understanding how it connects with this issue.

I noticed a comment at the end of setKioskComponent:

// If you're targeting OSes earlier than 10.6 and want to use this feature,
// you'll need to enable JUCE_SUPPORT_CARBON.

I checked and JUCE_SUPPORT_CARBON is enabled:

#if ! (defined (JUCE_SUPPORT_CARBON) || JUCE_64BIT)
     #define JUCE_SUPPORT_CARBON 1
#endif

but it looks like it’s only defined when the app is 32 bit? I’ve tried building in 64 bit and 32 bit mode on 10.7 and am getting the same behavior regardless. I’ve also tested the app on 10.5, 10.6, 10.7 and 10.8 and the same thing happens on all four. Here’s my code:

addToDesktop(0);
Desktop::getInstance().setKioskModeComponent(this, true);

#2

Yes, that’s the assertion at line 1918, warning you that it’s not supported!

I doubt whether you’d be able to build a 10.5 64-bit binary that also uses carbon, so this is probably one of the things that just won’t work for that particular configuration.


#3

OK. In that case…

I’m building the release with 32/64 architecture. When I install and launch the app on my 64-bit machine’s Leopard partition it launches as 64 bit. Is there a way to force the machine to open in 32-bit even if it’s on a 64 bit machine?