From cc274f1a31a11b5ee5ea8298936959a52d64090e Mon Sep 17 00:00:00 2001 From: simonhuang Date: Sat, 18 Sep 2021 15:18:56 +0800 Subject: [PATCH 1/2] Bugfix: 1. fix Memory Not Enough Error (caused by Circular import) by line 37 modification; 2. fix PySide2 freeze Error by line 28 modification; --- bin/pyrdp-player.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pyrdp-player.py b/bin/pyrdp-player.py index 25aa44ef0..d1482daea 100755 --- a/bin/pyrdp-player.py +++ b/bin/pyrdp-player.py @@ -25,7 +25,7 @@ import logging.handlers # noqa import sys # noqa import os # noqa - +os.environ['QT_MAC_WANTS_LAYER']='1' if HAS_GUI: from pyrdp.player import MainWindow from PySide2.QtWidgets import QApplication @@ -34,7 +34,7 @@ def enableNotifications(logger): """Enable notifications if supported.""" # https://docs.python.org/3/library/os.html - if os.name != "nt": + if os.name != "nt" and sys.platform != "darwin": notifyHandler = NotifyHandler() notifyHandler.setFormatter(logging.Formatter("[{asctime}] - {message}", style="{")) From 8157030a97923762e3feab6a35710f3f76629cde Mon Sep 17 00:00:00 2001 From: Olivier Bilodeau Date: Wed, 22 Sep 2021 10:09:37 -0300 Subject: [PATCH 2/2] Added a comment to clarify the macOS workaround --- bin/pyrdp-player.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/pyrdp-player.py b/bin/pyrdp-player.py index d1482daea..682f1de16 100755 --- a/bin/pyrdp-player.py +++ b/bin/pyrdp-player.py @@ -25,6 +25,7 @@ import logging.handlers # noqa import sys # noqa import os # noqa +# Workaround a macOS bug: https://bugreports.qt.io/browse/QTBUG-87014 os.environ['QT_MAC_WANTS_LAYER']='1' if HAS_GUI: from pyrdp.player import MainWindow