I wanted to have icons that are not tinted. I could achieve this by editing /usr/lib/qubes/icon-receiver
as follows: replaced icon_tinted
with icon
at lines 300 and 307, and commented line 298 as not necessary.
Comparasion
Before:
async def retrieve_icon_for_window(self, reader, color):
# intentionally don't catch exceptions here
# the Image.get_from_stream method receives UNTRUSTED data
# from given stream (stdin), sanitize it and store in Image() object
icon = await Image.get_from_stream_async(reader,
ICON_MAXSIZE, ICON_MAXSIZE)
# now we can tint the icon to the VM color
icon_tinted = icon.tint(color)
# conver RGBA (Image.data) -> ARGB (X11)
icon_tinted_data = self._convert_rgba_to_argb(icon_tinted.data)
# prepare icon header according to X11 _NET_WM_ICON format:
# "This is an array of 32bit packed CARDINAL ARGB with high byte
# being A, low byte being B. The first two cardinals are width, height.
# Data is in rows, left to right and top to bottom."
# http://standards.freedesktop.org/wm-spec/1.4/ar01s05.html
icon_property_data = struct.pack(
"II", icon_tinted.width, icon_tinted.height)
# and then append the actual icon
icon_property_data += icon_tinted_data
return icon_property_data
After:
async def retrieve_icon_for_window(self, reader, color):
....
#icon_tinted = icon.tint(color)
# conver RGBA (Image.data) -> ARGB (X11)
icon_tinted_data = self._convert_rgba_to_argb(icon.data)
....
icon_property_data = struct.pack(
"II", icon.width, icon.height)
....
Maybe you’re laughing at me right now: “What does this have to do with security?” But, how would I know? I say it may be that Qubes OS developers depend on what they wrote? Any change from user would break everything? Does this even exist in any OS or I’m mistaken in my thinking?