From cd710f583f5ab8650fa2e41c08dc9a6332a5680f Mon Sep 17 00:00:00 2001 From: miseran Date: Tue, 12 Oct 2021 01:46:35 +0200 Subject: Fix behaviour when TrueColor / 24 bit depth is not available (#114) * Fix regression introduced in c7ca547 which made nsxiv not start in non-TrueColor X server. * Introduce a new fix for embedding into tabbed-alpha. * Fixes a visual glitch from original sxiv when drawing transparent images in 8 bit depth. In 8 bit PseudoColor, `.pixel` is just an index into the 256 defined colors and thus trying to extract rgb bits from it would result in visual glitch. The values `.color.red` on the other hand and so on are always integers between 0 and 0xFFFF representing the color as expected. * Use XColor for win_bg/fg and mrk_fg Co-authored-by: NRK --- nsxiv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nsxiv.h') diff --git a/nsxiv.h b/nsxiv.h index 6ae2289..d65875b 100644 --- a/nsxiv.h +++ b/nsxiv.h @@ -416,9 +416,9 @@ struct win { Window xwin; win_env_t env; - unsigned long win_bg; - unsigned long win_fg; - unsigned long mrk_fg; + XColor win_bg; + XColor win_fg; + XColor mrk_fg; #if HAVE_LIBFONTS XftColor bar_bg; XftColor bar_fg; -- cgit v1.2.3-54-g00ecf