Subject: MIX and Xaw
From: [email-masked]

17 Feb 1998 05:59:17 -0800
Message-ID: <005EB0F300000002*.cygnus.gnu-win32@MHS>
To: [email-masked], [email-masked], [email-masked]

To: [email-masked]
    [email-masked]
    [email-masked]

MIX and Xaw
***********

In the Gnu-Win32-Maillist there were complaints against Microimages, because Xaw has problems displaying
on Microimages free Xserver MIX. It seems plausible, that the error is on MIX's side, because displaying
the output of a sample program on a UNIX-workstation works fine, while redirecting the output to the 
MIX-Server shows the misbehaviour.

Even if this seems evident, it's a bug in *Xaw*! The difference between most UNIX-Workstations and the 
MIX is, that the MIX-server is a truecolor-Display, while most UNIX-workstations have pseudocolor Displays
implemented. The point is, that Xaw uses the GXxor-Function to highlight/unhighlight simplemenu-entries, or
th draw the rubberband of a panned widget. From X11, not every GX-function is supported by every display-type, 
in our case, GXxor is not supported by truecolor Displays (GXxor is tricky, and truecolor Displays are
tricky, so the combination...)

I already patched the Simplemenu-Widget to work also on truecolor Displays. The diff-file is appended to this
mail. The Panner-Widget has still to be done and I will probably do in in the near future.

I hope that a change of this kind can be incorporated in future releases of Xaw and 
I would like to thank Microimages to give the MIX-Server for free. 

Thomas Irlet
[email-masked]

%%%%%%%%%%%%%%% smebsb.dif %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

90c90
< static void Redisplay(), Destroy(), Initialize(), FlipColors();
---
> static void Redisplay(), Destroy(), Initialize();
139,140c139,140
<     /* highlight          */    FlipColors,
<     /* unhighlight        */    FlipColors,
---
>     /* highlight          */    Redisplay,
>     /* unhighlight        */    Redisplay,
262c262,266
< 	else
---
> 	else {
> 	    XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w), 
> 			   entry->sme_bsb.rev_gc, 0, y_loc,
> 			   (unsigned int) entry->rectangle.width,
> 			   (unsigned int) entry->rectangle.height);
263a268
>         }
443a449,450
>  *
>  *      has been replaced
446,462d452
< static void 
< FlipColors(w)
< Widget w;
< {
<     SmeBSBObject entry = (SmeBSBObject) w;
<     SmeBSBObjectClass oclass = (SmeBSBObjectClass) XtClass (w);
< 
<     if (entry->sme_bsb.set_values_area_cleared) {
< 	return;
<     }
< 
<     XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),
< 		   entry->sme_bsb.invert_gc, 
< 		   0, (int) entry->rectangle.y,
< 		   (unsigned int) entry->rectangle.width, 
< 		   (unsigned int) entry->rectangle.height);
< }
676,680d665
<     values.foreground ^= values.background;
<     values.background = 0;
<     values.function = GXxor;
<     mask = GCForeground | GCBackground | GCGraphicsExposures | GCFunction;
<     entry->sme_bsb.invert_gc = XtGetGC(w, mask, &values);
698d682
<     XtReleaseGC(w, entry->sme_bsb.invert_gc);
701,715d684
< #ifdef apollo
< 
< /*
<  * The apollo compiler that we have optomizes out my code for
<  * FlipColors() since it is static. and no one executes it in this
<  * file.  I am setting the function pointer into the class structure so
<  * that it can be called by my parent who will tell me to when to
<  * highlight and unhighlight.
<  */
< 
< void _XawSmeBSBApolloHack ()
< {
<     FlipColors();
< }
< #endif /* apollo */

%%%%%%%%%%%%% End of smebsb.dif %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".