Skip to content

Commit

Permalink
#4307 don't assume that the windows mixin can be loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 26, 2024
1 parent bd66d36 commit 4f882ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xpra/server/mixins/encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from xpra.codecs.loader import get_codec, has_codec, codec_versions, load_codec
from xpra.codecs.video import getVideoHelper
from xpra.server.mixins.stub_server_mixin import StubServerMixin
from xpra.server.source.windows import WindowsMixin
from xpra.log import Logger
from xpra.common import FULL_INFO

Expand Down Expand Up @@ -98,6 +97,10 @@ def reinit_encodings(self) -> None:
# any window mapped before the threaded init completed
# may need to re-initialize its list of encodings:
log("reinit_encodings()")
try:
from xpra.server.source.windows import WindowsMixin
except ImportError:
return
for ss in self._server_sources.values():
if isinstance(ss, WindowsMixin):
ss.reinit_encodings(self)
Expand Down

0 comments on commit 4f882ee

Please sign in to comment.