To speed up some unit tests that minimize and maximize windows, I want to turn off the genie effect for those windows on Mac OS X. I can get the wxPython window like this:

import AppKit
nsw = AppKit.NSWindow.alloc().initWithWindowRef_(window.MacGetTopLevelWindowRef())

How can I turn off the genie effect for nsw?

有帮助吗?

解决方案

You cannot. There is no way to minimize a window on Mac OS X without the accompanying visual effect. (The minimization effect is performed by the Dock on the application's window, not by the application itself. Preventing the Dock from running just makes the application hang when it requests a window be minimized.)

You may be able to speed things up somewhat by setting the user's minimization effect to "Scale" (in the Dock pane of System Preferences), though.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top