Skip to content

Commit

Permalink
what we need is the rgb format
Browse files Browse the repository at this point in the history
this fixes 'mmap' paints which aren't using 'rgb' encoding but do contain rgb data anyway
  • Loading branch information
totaam committed Aug 22, 2024
1 parent 09c5afb commit 1774210
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xpra/client/gui/client_tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ def do_paint_rgb(self, context, encoding: str, rgb_format: str, img_data,
if width != render_width or height != render_height:
fire_paint_callbacks(callbacks, False, "tray paint must not use scaling")
return
if encoding != "rgb":
fire_paint_callbacks(callbacks, False, f"invalid encoding for tray: {encoding!r}")
rgb_format = options.strget("rgb_format", "BGRA" if encoding == "rgb" else "")
if not rgb_format:
fire_paint_callbacks(callbacks, False, f"no rgb format for tray update using {encoding!r}")
return
rgb_format = options.strget("rgb_format", "BGRA")
self.data = (rgb_format, width, height, rowstride, img_data[:], options)
if SAVE:
self.save_tray_png()
Expand Down

0 comments on commit 1774210

Please sign in to comment.