Skip to content

Commit

Permalink
Fix Mac wxpython example exiting with error code 255 (#162)...
Browse files Browse the repository at this point in the history
Add comment about tkinter_.py example not working on Mac.

Delete deprecated Mac examples.
  • Loading branch information
cztomczak committed Mar 1, 2017
1 parent de76641 commit e906a98
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1,699 deletions.
9 changes: 6 additions & 3 deletions examples/tkinter_.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Example of embedding CEF Python browser using Tkinter toolkit.
# This example has two widgets: a navigation bar and a browser.
#
# NOTE: This example doesn't work on Mac, details in Issue #306.
#
# Tested configurations:
# - Tk 8.6 and CEF Python v55.3+ on Linux
# - Tk 8.5 and CEF Python v55.4+ on Windows
# - Tk 8.5 on Windows
# - Tk 8.6 on Linux
# - CEF Python v55.3+
#
# Known issue on Linux: When typing url, mouse must be over url
# entry widget otherwise keyboard focus is lost (Issue #255
Expand Down Expand Up @@ -41,7 +44,7 @@ def main():
logger.addHandler(stream_handler)
logger.info("CEF Python {ver}".format(ver=cef.__version__))
logger.info("Python {ver}".format(ver=sys.version[:6]))
logger.info("Tk {ver}".format(ver=tk.TkVersion))
logger.info("Tk {ver}".format(ver=tk.Tcl().eval('info patchlevel')))
assert cef.__version__ >= "55.3", "CEF Python v55.3+ required to run this"
sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error
cef.Initialize()
Expand Down
6 changes: 4 additions & 2 deletions examples/wxpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ def OnClose(self, event):
g_count_windows -= 1
if g_count_windows == 0:
cef.Shutdown()
wx.GetApp().Exit()
wx.GetApp().ExitMainLoop()
# Call _exit otherwise app exits with code 255 (Issue #162).
# noinspection PyProtectedMember
os._exit(0)
else:
# Calling browser.CloseBrowser() and/or self.Destroy()
# in OnClose may cause app crash on some paltforms in
Expand All @@ -160,7 +163,6 @@ def clear_browser_references(self):


class FocusHandler(object):

def OnGotFocus(self, browser, **_):
# Temporary fix for focus issues on Linux (Issue #284).
if LINUX:
Expand Down
130 changes: 0 additions & 130 deletions src/mac/deprecated_64bit/prism.css

This file was deleted.

5 changes: 0 additions & 5 deletions src/mac/deprecated_64bit/prism.js

This file was deleted.

Loading

0 comments on commit e906a98

Please sign in to comment.