mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-15 17:20:07 +01:00
Add a MacReopenApp method for the superdoodle sample
This commit is contained in:
@@ -412,6 +412,17 @@ class DoodleApp(wx.App, InspectionMixin, SoftwareUpdate):
|
||||
self.SetAppDisplayName('SuperDoodle')
|
||||
return True
|
||||
|
||||
def MacReopenApp(self):
|
||||
"""
|
||||
Restore the main frame (if it's minimized) when the Dock icon is
|
||||
clicked on OSX.
|
||||
"""
|
||||
top = self.GetTopWindow()
|
||||
if top and top.IsIconized():
|
||||
top.Iconize(False)
|
||||
if top:
|
||||
top.Raise()
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user