From f7308d88d09e6fa763abe9472cac2af66a61b260 Mon Sep 17 00:00:00 2001 From: totaam Date: Mon, 9 Aug 2021 22:07:06 +0700 Subject: [PATCH] fix X11 threading bug we have to use idle_add to ensure we don't access X11 from the wrong thread --- xpra/client/mixins/audio.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xpra/client/mixins/audio.py b/xpra/client/mixins/audio.py index 8bcaa31ce0..45827002ef 100644 --- a/xpra/client/mixins/audio.py +++ b/xpra/client/mixins/audio.py @@ -3,6 +3,8 @@ # Xpra is released under the terms of the GNU GPL v2, or, at your option, any # later version. See the file COPYING for details. +from gi.repository import GLib + from xpra.platform.paths import get_icon_filename from xpra.scripts.parsing import sound_option from xpra.net.compression import Compressed @@ -205,7 +207,9 @@ def parse_server_capabilities(self, c : typedict) -> bool: self.show_progress(90, "starting speaker forwarding") self.start_receiving_sound() if self.server_sound_receive and self.microphone_enabled: - self.start_sending_sound() + #call via idle_add because we may query X11 properties + #to find the pulseaudio server: + GLib.idle_add(self.start_sending_sound) return True