We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Present mode issues
Page Index Toggle Pages: 1
Present mode issues (Read 5589 times)
Present mode issues
Dec 30th, 2005, 6:43am
 
So I have my sketch exported to an app to run in present mode, full screen.  The app itself is a simple file browser, where you can open files to run in other apps.   I'm just using:

open("file.ext");

This works as intended in windowed mode, but not in Present mode.  Present mode doesn't seem to lose focus of the app when it opens files (and the files i'm opening run an app that also shows them fullscreen).  So Present mode always hogs the foreground.

Is there any way around this?
Re: Present mode issues
Reply #1 - Dec 30th, 2005, 2:58pm
 
that's because present mode takes exclusive control of the screen, it's actually a special video mode.

you should instead try to make a window the size of the screen and see how that works out. the "frame" object will be the window itself, so try:
frame.setUndecorated(true);
inside setup() as well.
Re: Present mode issues
Reply #2 - Dec 30th, 2005, 5:58pm
 
Hmm...I still get the same thing I do when I just do size(screen.width,screen.height);  Meaning I still get the window chrome and the Apple menu (I'm using OS X).

I assume frame needs some sort of frame object?  I did:

Frame frame = new Frame();
frame.setUndecorated(true);

That doesn't seem to do anything.  Am I missing something?  I don't see any documentation for frames in the processing reference, so I'm not sure if that's right.  The Java stuff I read doesn't make a lot of sense to me.  Perhaps this is just over my head, and/or something processing wasn't meant to do.
Re: Present mode issues
Reply #3 - Dec 30th, 2005, 6:07pm
 
nope, frame already exists. you don't need to make a new one. you just type it as i wrote it in your setup.

and on osx, it unfortunately cant' take over the whole screen because of how osx works (windows can do this without any trouble). the menu bar will always be there, unless you're using the full screen exclusive mode, the way that present mode works.
Re: Present mode issues
Reply #4 - Dec 30th, 2005, 7:09pm
 
Ahh ok, so it looks like OS X is getting in the way then.  That sucks.  Thanks for the help though, I appreciate it.
Re: Present mode issues
Reply #5 - Feb 8th, 2006, 11:56am
 
Fry, do you think you could elaborate a little about how to set the aplet to go into 'present' mode (on a PC) from within the code (if that's possible). I have an applet (building it in Eclipse) I'd like to go fullscreen but nothing I've tried so far is working. (ps, it's OpenGL)
Re: Present mode issues
Reply #6 - Feb 16th, 2007, 5:21am
 
I don't mean to bump this but today I found a solution to my problem (yes after over a year ;), and I wanted to share it with anyone who may be trying to do the same thing I am.

On Macworld recently I found a piece about being able to hide and show the dock easily in any application in OS X:

http://www.macworld.com/weblogs/macosxhints/2007/02/hidemenubar/index.php

It's just a simple change to info.plist:

<key>LSUIPresentationMode</key>
<integer>4</integer>

After the first <dict> statement in the app's info.plist is where it goes.

With this, when you launch the app the OS X menubar and dock will hide.  If you rollover the area with the dock or menubar they will pop back out.  This of course only applies to exported apps on OS X.

This is going to be very handy for me as I have written a simple file launcher included in my slide show for presentations and now I can make a chromeless window fullscreen (true fullscreen) and launch other apps to the foreground.  Before if I wanted true fullscreen I would have to use present mode (which would hog the foreground, so I couldn't launch other apps in front of it) or live with the OS X menubar at the top of the screen (which I didn't like as much).

Now I have the best of both worlds.  Hope this helps anyone looking to do the same.
Re: Present mode issues
Reply #7 - Apr 7th, 2007, 5:02pm
 
Vitaflo, thanks so much for that tip. You just saved me a lot of googling and potential frustration.
Re: Present mode issues
Reply #8 - May 6th, 2007, 6:23pm
 
vitaflo's solution works great, the only problem I have is with OpenGL and trying to turn off the frame:

Code:
frame.setUndecorated(true) 


I keep getting the following exception:

Code:
java.awt.IllegalComponentStateException: The frame is displayable. 


If I turn off OpenGL of course this works fine. But then again, if you're working in fullscreen, you want OpenGL.
Re: Present mode issues
Reply #9 - May 6th, 2007, 6:47pm
 
Ok, I found a solution thanks to Mr. Watz:

http://workshop.evolutionzone.com/2007/01/10/code-framesetundecoratedtrue/

His site is starting to become a treasure-trove for OpenGL issues in Processing.

I just noticed that I had /already/ seen this and even commented it! Ugh. How embarassing.
Re: Present mode issues
Reply #10 - Jan 17th, 2009, 4:34pm
 
I've used this info.plist modification with success in the Processing app folder. However when I run my sketch (a video sketch that malfunctions in Present mode) the Menu Bar returns with my sketch name. This must be because I am immediately opening Java to run the sketch? I have changed info.plist in Java just to see. Is there somewhere else to change it to remove the Menu Bar when the sketch is running? Thanks
Re: Present mode issues
Reply #11 - Dec 15th, 2009, 10:46am
 
I just figured out something-- if you want the "task" bar, or the bar on top of the processing app to go away when you present it (on osx), add this to the info.plist:

Code:

<key>LSBackgroundOnly</key>
<true/>


So, by adding all this to the info.plist:

Code:

<key>LSUIPresentationMode</key>
<integer>4</integer>
<key>LSBackgroundOnly</key>
<true/>


You get a very nice fullscreen view!  Cheesy Enjoy...
Page Index Toggle Pages: 1