Le 07/02/2018 à 13:12,
scotty...@gmail.com a écrit :
> But why is the Visual colour masks wrong on Windows? I think they are hard coded that way:
>
> TkWinDisplayChanged(
> Display *display)
> {
> .........
> } else if (screen->root_depth >= 24) {
> screen->root_visual->class = TrueColor;
> screen->root_visual->map_entries = 256;
> screen->root_visual->red_mask = 0xff;
> screen->root_visual->green_mask = 0xff00;
> screen->root_visual->blue_mask = 0xff0000;
This code was added through:
https://core.tcl.tk/tk/info/0eb7a8a6ca8d4336
in order to fix:
https://core.tcl.tk/tk/tktview?name=223689ffff
The patch fixing the above bug has been committed and the ticket got
closed immediately.
Then Brian Griffin provided the following interesting comment in the
ticket, and I think it was never adressed:
<quote>
I tried this out and it appears to work except in two cases:
photo images and my custom widgets. Is there something
special a custom C widget needs to do to get the colors
straight? The C code is using the Xlib emulation layer + Tk
drawing routines.
Pre-existing images appear blank, at least the photo images
do; bitmaps seem to be fine. Do these need to be handled as
a special case?
Test environment: using remote display, host is winxp,
remote is win2k. Host depth 32, remote depth 16.
What's the reason for #if 0 in tkWinWm.c:InvalidateSubTreeDepth?
</quote>
> Perhaps the Visual masks in TkWinDisplayChanged() should be changed?
Yes, perhaps it would be a good time to address Brian's comment...
Any other opinions?
Regards,
Francois