Skip to content

Commit

Permalink
#812 fix shadow servers to load platform specific clipboard support
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@22519 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 23, 2019
1 parent 8081f03 commit 3a9dbd6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/xpra/server/mixins/clipboard_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,13 @@ def init_clipboard(self):
self.clipboard_filter_file, exc_info=True)
return
try:
if POSIX and not OSX:
from xpra.x11.gtk_x11.clipboard import X11Clipboard as ClipboardClass #@UnusedImport
else:
from xpra.clipboard.gdk_clipboard import GDKClipboardProtocolHelper as ClipboardClass #@Reimport
from xpra.platform.features import CLIPBOARD_NATIVE_CLASS
assert CLIPBOARD_NATIVE_CLASS, "no native clipboard support"
parts = CLIPBOARD_NATIVE_CLASS.split(".")
mod = ".".join(parts[:-1])
module = __import__(mod, {}, {}, [parts[-1]])
ClipboardClass = getattr(module, parts[-1])
log("ClipboardClass for %s: %s", CLIPBOARD_NATIVE_CLASS, ClipboardClass)
kwargs = {
"filters" : clipboard_filter_res,
"can-send" : self.clipboard_direction in ("to-client", "both"),
Expand Down

0 comments on commit 3a9dbd6

Please sign in to comment.