Skip to content

Commit

Permalink
fix X11 threading bug
Browse files Browse the repository at this point in the history
we have to use idle_add to ensure we don't access X11 from the wrong thread
  • Loading branch information
totaam committed Aug 9, 2021
1 parent 30a584b commit f7308d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xpra/client/mixins/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit f7308d8

Please sign in to comment.