Skip to content

Commit

Permalink
handle 'RGBA' window icon data
Browse files Browse the repository at this point in the history
(rather than handling 'BGRA' twice..)
  • Loading branch information
totaam committed May 6, 2023
1 parent 364cc6b commit 22c6afe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions xpra/client/mixins/window_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,9 @@ def _window_icon_image(self, wid, width, height, coding, data):
self, width, height, coding, len(data), ICON_SHRINKAGE, ICON_OVERLAY)
if coding=="default":
img = self.overlay_image
elif coding == "BGRA":
elif coding in ("BGRA", "RGBA"):
rowstride = width*4
img = Image.frombytes("RGBA", (width,height), memoryview_to_bytes(data), "raw", "BGRA", rowstride, 1)
has_alpha = True
elif coding in ("BGRA", ):
rowstride = width*4
img = Image.frombytes("RGBA", (width,height), memoryview_to_bytes(data), "raw", "BGRA", rowstride, 1)
img = Image.frombytes("RGBA", (width,height), memoryview_to_bytes(data), "raw", coding, rowstride, 1)
has_alpha = True
else:
from xpra.codecs.pillow.decoder import open_only
Expand Down

0 comments on commit 22c6afe

Please sign in to comment.