Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] xaw client mega-bug (PR#1218)
Home

[Freeciv-Dev] xaw client mega-bug (PR#1218)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] xaw client mega-bug (PR#1218)
From: jdorje@xxxxxxxxxxxxxxxxxxxxx
Date: Thu, 10 Jan 2002 16:28:33 -0800 (PST)

I guess not many people use the xaw client, because I didn't hear about this until today :-).

Apparently there was a bug in the unification of get_canvas_xy, so that the function fails entirely and nothing can ever be drawn correctly. I thought it was tested at the time, but I suppose it must not have been.

Here is a correction. Note, I'm not an xaw programmer at all; I just copied the XtVaGetValues() call from elsewhere where it's used.

Another alternative would be to store this data (width/height) globally. I'm strongly in favor of this alternative, but I believe it should be stored globally and GUI-independent, i.e. in mapview_common.h. This will take more work.

jason
Index: client/gui-xaw/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/mapview.c,v
retrieving revision 1.91
diff -u -r1.91 mapview.c
--- client/gui-xaw/mapview.c    2001/12/21 19:14:20     1.91
+++ client/gui-xaw/mapview.c    2002/01/11 00:23:37
@@ -74,7 +74,7 @@
 static int get_canvas_xy(int map_x, int map_y, int *canvas_x,
                         int *canvas_y)
 {
-  int width, height;
+  Dimension width, height;
 
   XtVaGetValues(map_canvas, XtNwidth, &width, XtNheight, &height, NULL);
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] xaw client mega-bug (PR#1218), jdorje <=