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 › Fullsceen Mode selectInput() not in foreground
Page Index Toggle Pages: 1
Fullsceen Mode selectInput() not in foreground (Read 2109 times)
Fullsceen Mode selectInput() not in foreground
Jun 18th, 2009, 1:03pm
 
I've having a problem with selectInput() not working in fullscreen mode.  I believe it is forced to the background where I can't see it.  How can I force the selectInput dialog to be placed in the foreground during full screen mode?

Thanks!
Re: Fullsceen Mode selectInput() not in foreground
Reply #1 - Jun 19th, 2009, 12:58pm
 
I suspect that in fullscreen mode the sketch frame is set so that it is always above all the other windows.

If my suspicion is true then this might work. Before calling selectInput() try the following

Code:
frame.setAlwaysOnTop(false); 



You can always set it back to true after the selectInput().

Will be interested in knowing if it works in this situation.

Re: Fullsceen Mode selectInput() not in foreground
Reply #2 - Jun 19th, 2009, 1:45pm
 
Excellent idea, but it didn't work. Sad
For the moment, I've resorted to two Processing applications, once I've done my selectInput(), I call the second program to go full screen.  Not exactly what I wanted but it works.  Let me know if you have any other ideas, this should be something that is added to Processing or perhaps a library.
Re: Fullsceen Mode selectInput() not in foreground
Reply #3 - Jun 19th, 2009, 2:07pm
 
Processing goes full screen in two different ways: in exclusive mode, it just uses Java's GraphicsDevice.setFullScreenWindow() method, which is... exclusive (if the system supports it): as the name implies, "Windows cannot overlap the full-screen window. All other application windows will always appear beneath the full-screen window in the Z-order. ". That includes file selection window...

In non-exclusive mode, it just remove window decorations and resize the frame to the size of the screen (perhaps minus toolbars, etc.).

I don't know what mode you want, but if that's the exclusive one, your workaround might be the way to go.
Re: Fullsceen Mode selectInput() not in foreground
Reply #4 - Jun 19th, 2009, 2:22pm
 
Non-exclusive mode would probably be fine.
I having an issue with my work around in Windows.  I figured the libraries would be the same and I would just have to copy my splash.exe over, but no go.  For some reason, it keeps launching the main.exe, even when I click the splash.exe.  There must be something in the libraries telling it otherwise.
Re: Fullsceen Mode selectInput() not in foreground
Reply #5 - Jun 19th, 2009, 3:29pm
 
I just had an idea!  I can use the fullscreen library with SoftFullScreen on my splashscreen (can't use it on the main app as it doesn't work with my OpenGL components).  Then jump into my other presentation fullscreen app.

One issue, for a brief second as Processing loads.. the screen is gray.  Any thoughts on how to turn this black.  It seems to be before start().
Re: Fullsceen Mode selectInput() not in foreground
Reply #6 - Jun 20th, 2009, 9:12am
 
Adding this to my code should work according to older posts... but doesn't for some reason... kills the program instantly.  I think it must place it in the wrong place when compiling it.
Code:

static public void main(String args[]) {
   PApplet.main(new String[] { "--present", "--bgcolor=#000000", "--hide-stop", "TestApp" });
 }

The default exported with the PDE when selecting FullScreen Mode is "--bgcolor=#666666".

I've also tried to change the preferences file in the lib folder.
# FULL SCREEN (PRESENT MODE)
run.present.bgcolor = #000000

but that doesn't seem to change the color when it compiles the .java file.

Re: Fullsceen Mode selectInput() not in foreground
Reply #7 - Jun 20th, 2009, 11:37am
 
Ok, I got it!
You have to make sure that the sketchname is exact.  Here I have TestApp, so your sketch has to be called TestApp.

Code:

static public void main(String args[]) {
PApplet.main(new String[] { "--present", "--bgcolor=#000000", "--hide-stop", "TestApp" });
}
Re: Fullsceen Mode selectInput() not in foreground
Reply #8 - Jun 20th, 2009, 1:09pm
 
Interesting... I just found this completely by accident.  If you reorder the code, putting the name of the App first (don't know what this does on the back end):
Code:

static public void main(String args[]) {
   PApplet.main(new String[] { "TestApp", "--present", "--bgcolor=#000000", "--hide-stop"});
}

This will produce a Full Screen App, but not in exclusive mode.  However, unlike the normal non-execlusive mode app, the menubars disappear.  Using this approach, I can have a single program, that is full screen hiding all menus but still allows the open dialog to come through.  Tested only on the Mac, will let you know how the approach looks on Windows on Monday.
Re: Fullsceen Mode selectInput() not in foreground
Reply #9 - Jun 21st, 2009, 9:11am
 
After some more testing, reversing the order doesn't do anything... Adding that code puts it into a non-exclusive mode apparently regardless of the order.
Re: Fullsceen Mode selectInput() not in foreground
Reply #10 - Jun 21st, 2009, 9:48am
 
You probably know this page already, but for reference, I point you to main()'s documentation.
Re: Fullsceen Mode selectInput() not in foreground
Reply #11 - Jun 21st, 2009, 10:44am
 
Thanks, I also add this to my code:
Code:

public void init(){
// to make a frame not displayable, you can
// use frame.removeNotify()

frame.removeNotify();

frame.setUndecorated(true);

// addNotify, here i am not sure if you have
// to add notify again.
frame.addNotify();
super.init();
}
Re: Fullsceen Mode selectInput() not in foreground
Reply #12 - Jun 22nd, 2009, 7:58am
 
Sorry to say that it didn't work on Windows, so I had to go back to using two applications where one launches the other.
Page Index Toggle Pages: 1