2014-06-12 18:42:44 +02:00
|
|
|
From: Egbert Eich <eich@suse.de>
|
|
|
|
Date: Tue Jun 3 18:17:07 2014 +0200
|
|
|
|
Subject: [PATCH]Fix number of colormap entries for DirectColor and TrueColor visuals
|
|
|
|
Patch-mainline: to be upstreamed
|
|
|
|
Git-commit: 071525466531009223f1c21a40aa2e081d5ef99a
|
|
|
|
Git-repo:
|
|
|
|
References: bnc#
|
|
|
|
Signed-off-by: Egbert Eich <eich@suse.com>
|
|
|
|
|
|
|
|
DirectColor and TrueColor have a decomposed colormap,
|
|
|
|
therefore the colormap_size field in the XVisualInfo
|
|
|
|
structure is meant per sub-field (take a look at the output
|
|
|
|
of xdpyinfo).
|
|
|
|
With 3 sub-fields there are colormap_size^3 entires.
|
|
|
|
|
|
|
|
Signed-off-by: Egbert Eich <eich@suse.de>
|
|
|
|
---
|
|
|
|
xterm-299/misc.c | 3 ++-
|
|
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
|
2023-10-03 16:04:15 +02:00
|
|
|
Index: xterm-385/misc.c
|
|
|
|
===================================================================
|
|
|
|
--- xterm-385.orig/misc.c
|
|
|
|
+++ xterm-385/misc.c
|
|
|
|
@@ -2698,6 +2698,8 @@ getColormapInfo(XtermWidget xw, unsigned
|
2014-06-12 18:42:44 +02:00
|
|
|
if (getVisualInfo(xw)) {
|
|
|
|
*typep = (unsigned) xw->visInfo->class;
|
|
|
|
*sizep = (unsigned) xw->visInfo->colormap_size;
|
|
|
|
+ if (*typep > 3)
|
|
|
|
+ *sizep = (*sizep)*(*sizep)*(*sizep);
|
|
|
|
} else {
|
|
|
|
*typep = 0;
|
|
|
|
*sizep = 0;
|