Skip to content

Commit

Permalink
fix draw passthrough stripping of unused alpha channel
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Mar 7, 2024
1 parent 0cdb7a5 commit 7514d88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xpra/server/proxy/proxy_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def send_updated(packet:PacketType, encoding, compressed_data, updated_client_op
if wid not in self.lost_windows:
self.queue_client_packet(packet)

def passthrough(strip_alpha=True) -> bool:
def passthrough(strip_alpha=True) -> None:
enclog("proxy draw: %s passthrough (rowstride: %s vs %s, strip alpha=%s)",
rgb_format, rowstride, client_options.intget("rowstride", 0), strip_alpha)
updated = packet
Expand All @@ -669,7 +669,7 @@ def passthrough(strip_alpha=True) -> bool:
if Xindex>=0 and len(rgb_format)==4:
#force clear alpha (which may be garbage):
newdata = bytearray(pixels)
c = chr(255)
c = 255
for i in range(len(pixels)//4):
newdata[i*4+Xindex] = c
updated = self.replace_packet_item(packet, 9, client_options.intget("rowstride", 0))
Expand Down

0 comments on commit 7514d88

Please sign in to comment.