[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: Crosshair color in lesstif Pcb



Hi,

the crosshairColor (color) ressource doesn't change the crosshair color
any more in lesstif pcb.

This patch solve the problem for me, but my C knowledge comes from 8bits
processor old time...

All the best,
joël


 diff -u main-ori.c main.c 
--- main-ori.c	2008-09-11 20:44:10.000000000 +0200
+++ main.c	2008-09-11 20:37:35.000000000 +0200
@@ -1572,13 +1572,16 @@
   static int showing = 0;
   static int sx, sy;
   static GC xor_gc = 0;
+  Pixel crosshair_color;
 
   if (!crosshair_in_window || !window)
     return;
   if (xor_gc == 0)
     {
+      crosshair_color = lesstif_parse_color (Settings.CrosshairColor);
       xor_gc = XCreateGC (display, window, 0, 0);
-      XSetFunction (display, xor_gc, GXinvert);
+      XSetFunction (display, xor_gc, GXxor);
+      XSetForeground (display, xor_gc, crosshair_color);
     }
   if (show == showing)
     return;
@@ -3841,4 +3844,3 @@
   hid_register_hid (&lesstif_gui);
 #include "lesstif_lists.h"
 }
-





_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user