Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] (PR#7778) Win32 client: moving a unit locks up mapview
Home

[Freeciv-Dev] (PR#7778) Win32 client: moving a unit locks up mapview

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7778) Win32 client: moving a unit locks up mapview
From: "James Canete" <use_less@xxxxxxxxxxx>
Date: Wed, 10 Mar 2004 18:47:19 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7778 >

I figured out that the problem is that mapview_canvas.single_tile is
never initialized in the gui-win32 client.

The win32 client appears to call init_map_win() in gui-win32/mapview.c
instead of calling init_mapview_and_overview() in mapview_common.c. 
These functions are basically the same, just pre and post the canvas
structures.  I added the remaining functionality not covered by
init_mapview_and_overview() to the caller of init_map_win(),
create_main_window(), in gui-win32/gui_main.c .

In redirecting the call, I found that it crashed in map_resize(), which
also has a replacement in mapview_common.c called map_canvas_resized().
 So I changed that call as well.

Here's the patch.  I also removed a couple static bitmaps from
mapview.c, replacing one with a macro referencing a canvas store, and
completely removing the other since it was only referred to in
map_size_changed(), and that reference was duplicating code from the
caller of map_size_changed(), set_overview_dimensions() in
mapview_common.c .

Too many changes?
-James Canete

Attachment: win32removeredundant.diff
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]