From c661db24f275e0dc21b93fd5cfa49f92d8b1b430 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sat, 23 Jul 2016 09:47:40 +0000 Subject: [PATCH] ugly code to distinguish png cursors from regular ones git-svn-id: https://xpra.org/svn/Xpra/trunk@13081 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/server/proxy/proxy_instance_process.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/xpra/server/proxy/proxy_instance_process.py b/src/xpra/server/proxy/proxy_instance_process.py index 5abac45167..3009c6aa16 100644 --- a/src/xpra/server/proxy/proxy_instance_process.py +++ b/src/xpra/server/proxy/proxy_instance_process.py @@ -591,8 +591,16 @@ def process_server_packet(self, proto, packet): elif packet_type=="cursor": #packet = ["cursor", x, y, width, height, xhot, yhot, serial, pixels, name] #or: + #packet = ["cursor", "png", x, y, width, height, xhot, yhot, serial, pixels, name] + #or: #packet = ["cursor", ""] - self._packet_recompress(packet, 8, "cursor") + if len(packet)>=8: + #hard to distinguish png cursors from normal cursors... + try: + int(packet[1]) + self._packet_recompress(packet, 8, "cursor") + except: + self._packet_recompress(packet, 9, "cursor") elif packet_type=="window-icon": self._packet_recompress(packet, 5, "icon") self.queue_client_packet(packet)