]> git.draconx.ca Git - rrace.git/commit
Separate EWMH colour conversion from icon generation.
authorNick Bowler <nbowler@draconx.ca>
Fri, 13 Jan 2023 01:55:56 +0000 (20:55 -0500)
committerNick Bowler <nbowler@draconx.ca>
Fri, 13 Jan 2023 01:55:56 +0000 (20:55 -0500)
commitb4b5688edd332e17591ca7bc1cdd64c296abe1c5
treea23f8aea3c2cfa56d5ec505f4523cae4e1e1211a
parent2345a9dba343693668ece5abbba1fe58e0e18ed8
Separate EWMH colour conversion from icon generation.

We don't need to recompute the ARGB colour values for every single
pixel, we can do this in advance once for each possible colour.  To
do this, we alter the behaviour to use the 'pixel' member of the
supplied XColor array, and create a new function that can be called
beforehand to populate it based on red/green/blue values.

Interestingly, the ewmhicon test program was already providing an
XColor array with 'pixel' values that are correct for this new
behaviour, so it needs no changes, except a new mode is added
as a basic sanity check for the new function.
src/ewmhicon.c
src/ewmhicon.h
src/x11.c
t/ewmhicon.c
tests/gui.at
testsuite.at