()
| 38 | |
| 39 | |
| 40 | def main(): |
| 41 | check_versions() |
| 42 | sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error |
| 43 | settings = {} |
| 44 | if MAC: |
| 45 | # Issue #442 requires enabling message pump on Mac |
| 46 | # and calling message loop work in a timer both at |
| 47 | # the same time. This is an incorrect approach |
| 48 | # and only a temporary fix. |
| 49 | settings["external_message_pump"] = True |
| 50 | if WINDOWS: |
| 51 | # noinspection PyUnresolvedReferences, PyArgumentList |
| 52 | cef.DpiAware.EnableHighDpiSupport() |
| 53 | cef.Initialize(settings=settings) |
| 54 | app = CefApp(False) |
| 55 | app.MainLoop() |
| 56 | del app # Must destroy before calling Shutdown |
| 57 | if not MAC: |
| 58 | # On Mac shutdown is called in OnClose |
| 59 | cef.Shutdown() |
| 60 | |
| 61 | |
| 62 | def check_versions(): |
no test coverage detected