Loading...
Logo
Processing Forum
I developed a Processing sketch with Eclipse as a native Java Application on Windows. Running it in "present" mode works properly, it's fullscreen and no other applications are showing.

Now I tried the same Java Application on OSX, and it worked fine, except to OSX's Menu Bar still showing on top of the Processing "fullscreen" window. But the area under the menu bar still is part of the Processing window - I have some controlP5 elements up there, which are not accessible this way.

Any ideas what is going on there, and whether this is a bug with Processing's "present" mode?

Replies(8)

Take a look at Hansi's FullSceen Library, it will hide the OSX menu.
Still: is this behaviour (showing OSX menu bar in present mode) a  bug in Processing ?


I already had a look on the fullscreen lib, but there were some drawbacks - and advantages too of course!

A question: will the Soft Fullscreen mode with that library also hide the OSX menu bar (I have no OSX, so I cannot try) ?


Dis/advantages with the library for me:

+) real full screen
+) changeable resolution
+) entering/leaving fullscreen possible at runtime

-) license is GPL = incompatible with my project's license OSL
-) the autor says it's crashing sometimes
-) it's another library just for not showing the menu bar on OSX
Softfullscreen will still hide the OSX menu bar.  That's what I use.  I've never had it crash and I've been using it for over a year.
I discussed the license with Hansi, since I had the same problem and he told me in an e-mail that he was changing it to MIT.

You can download the component that hides the menubar without all the other components.  It's available here https://github.com/kritzikratzi/jAppleMenuBar
hey!

i will change the license asap, should done by the end of the week.
crashes should only occur when switching rapidly between fullscreen and windowed mode using the opengl render. shouldn't be a problem at all if you use java2d or the p2d/p3d renderers (even then i hardly ever see that happening, but i run automated unit tests and they show me it crashes sometimes).

if you only want to hide the menu bar you can also use the jAppleMenuBar library jeff already pointed to. if you don't want to compile it yourself you can pull the needed files out of the fullscreen project:
https://github.com/kritzikratzi/fullscreen-p5/blob/master/src/japplemenubar/JAppleMenuBar.java
https://github.com/kritzikratzi/fullscreen-p5/blob/master/lib/libjAppleMenuBar.jnilib
that of course only works easily if you use processing from eclipse/netbeans/intellij.

you have one last alternative, this should be your preferred way if you _only_ use fullscreen mode and don't want to switch between modes.
just export your app. then go into the app (right click in finder, then "show package contents"),
look for the info.plist and set LSUIPresentationMode to 4 ( http://www.macworld.com/article/55321/2007/02/hidemenubar.html)


hope that helps,
best, hansi.

just export your app. then go into the app (right click in finder, then "show package contents"), 
look for the info.plist and set LSUIPresentationMode to 4 (http://www.macworld.com/article/55321/2007/02/hidemenubar.html)
 
That sounds interesting. With exported app you mean the .jar file i generated in Eclipse? I examined the jar archive file and did not find a info.plist file. The only file not a .class was META-INF/MANIFEST.MF and it did not contain any useful data in this context.

Note that I do not have access to a Mac... and I want to stay platform independent. I wonder what happens if I use  JAppleMenuBar.java on Windows or Linux, might also try that out.
He was talking about if you exported from within Processing, which will package an .app or .exe file for you depending on the OS.  The show package contents refers to the .app file on a Mac, which contains an info.plist.
Ah, ok thanks for the info. So I'll better go with his library, as a .jar runs fine on all platforms.
hey!

license is now MIT.

oh, and yep, like jeff said: the LSUIPresentationMode setting concerns the mac .app package.


one more thing: if you only use the jAppleMenuBar lib (without the fullscreen library) make sure you detect the operating system and only call that code on mac os.

best, hansi.