OS X no menu bar at startup on Maverick because of LSBackgroundOnly=True

230 views
Skip to first unread message

Georg Holzmann

unread,
Jan 26, 2014, 11:28:09 AM1/26/14
to pyins...@googlegroups.com
Hallo!

On OS X GUI apps, the default value of LSBackgroundOnly in the app bundles Info.plist is True, as explained here:
https://groups.google.com/forum/#!msg/pyinstaller/f3800Jc0rr0/rFTwSOSESVAJ

However, a side effect of it is, that the menu bar is not shown at first startup on Maverick (on my Mountain Lion machine it worked as it should):
- click on the generated App Bundle in Finder
- then the App launches but the menu bar of the Finder is still display
- if I change now the window and then go back to my App window, the menu bar finally appears

If I set LSBackgroundOnly=False, the menu bar appears immediatly at startup, but two app icons are shown (known behaviour).
BTW: I use wxpython in my example with pyinstaller 2.1.

Does anyone else experience the same problem and/or is there maybe a workaround to get the menu bar in focus?

Thanks a lot for any answers,
LG
Georg

Georg Holzmann

unread,
Feb 3, 2014, 4:39:38 AM2/3/14
to pyins...@googlegroups.com
Hallo again!

On another Maverick machine, the behaviour of the menu bar is even worse:
I have no Menu Bar displayed when I run the application. It’s just a floating window. So, If I minimize the application window (yellow button), and then try to relaunch it from the Dock, nothing happens. My only option is to quit the application and restart it. In essence there is no way to call the application back up to the desktop.

Does anyone else experience the same problems or have any hints, how to deal with that issue?

Thanks a lot,
LG
Georg

Manuel Koch

unread,
Feb 4, 2014, 5:14:49 PM2/4/14
to pyins...@googlegroups.com
I experience the same problem on Mac OS Maverick and PyInstaller 2.1 and PyQt app.
Minimizing and maximizing the GUI window does not result in menu being shown.
But it gets shown after I swapped windows using cmd-tab key.

I have not found a workaround so far.

Peder Jørgensen

unread,
Jul 28, 2014, 4:09:38 AM7/28/14
to pyins...@googlegroups.com
Hi!
Same problem here, and haven't found a work around yet.

Peder Jørgensen

unread,
Jul 28, 2014, 4:58:00 AM7/28/14
to pyins...@googlegroups.com
Hi!
I'm experiencing the same issue. I'm trying to find a work around for this. So far I've found that triggering a menu item when the app starts will show the menu bar, how ever it will not be responding to clicks.
 
#Create a dummy action for demonstration.

self.dummyAction = QtGui.QAction("Dummy Action", self,
shortcut=QtGui.QKeySequence.Open,
triggered=self.showWindowOSXHack)

#Add action to the menu then

self.windowMenu.addAction(self.showMainWindowAction)


#Call os.system to inject a key sequence into the app.


def showWindowOSXHack(self):
os.system("""osascript -e 'tell application "System Events" to tell first process whose frontmost to keystroke "o" using command down'""")

#Where Command+O is the standard open command for OsX

The menu is shown, but still not responding to any clicks. There might be some other System Event I could inject that will show the menu bare and make it active, but haven't found one yet.


On Sunday, January 26, 2014 5:28:09 PM UTC+1, Georg Holzmann wrote:

grh

unread,
Jul 28, 2014, 5:08:17 AM7/28/14
to pyins...@googlegroups.com, peder.j...@gmail.com
Hallo Peder!

I also did not find a workaround yet ...
If you find out how to get this working, please let us know ;)

LG
Georg
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PyInstaller" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/pyinstaller/xSS5vudG0e8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> pyinstaller...@googlegroups.com
> <mailto:pyinstaller...@googlegroups.com>.
> To post to this group, send email to pyins...@googlegroups.com
> <mailto:pyins...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/pyinstaller.
> For more options, visit https://groups.google.com/d/optout.


signature.asc

Gabriel Reis

unread,
Oct 28, 2014, 6:13:40 PM10/28/14
to pyins...@googlegroups.com
Hi,

I have exactly the same problem here on Yosemite.

Has anyone ever got a solution for this issue?

Thank you,
Gabriel

Darius Vitonis

unread,
Feb 5, 2015, 10:59:22 AM2/5/15
to pyins...@googlegroups.com
Here's my workaround for menu bar on mavericks and yosemite
I've built on Lion and Yosemite and tested on Lion+ platforms.

Darius
Reply all
Reply to author
Forward
0 new messages