Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2005:
[Freeciv-Dev] Re: (PR#14307) Middle-click leaves graphical residue
Home

[Freeciv-Dev] Re: (PR#14307) Middle-click leaves graphical residue

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#14307) Middle-click leaves graphical residue
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Oct 2005 17:30:04 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14307 >

I don't understand why this happens but this should fix it.

-jason


Index: client/gui-gtk-2.0/mapview.c
===================================================================
--- client/gui-gtk-2.0/mapview.c        (revision 11123)
+++ client/gui-gtk-2.0/mapview.c        (working copy)
@@ -319,8 +319,10 @@
        * any pending updates, to make sure only the most up-to-date data
        * is written (otherwise drawing bugs happen when old data is copied
        * to screen).  Then we draw all changed areas to the screen. */
-      dirty_rect(ev->area.x, ev->area.y, ev->area.width, ev->area.height);
-      unqueue_mapview_updates(TRUE);
+      unqueue_mapview_updates(FALSE);
+      gdk_draw_drawable(map_canvas->window, civ_gc, mapview.store->v.pixmap,
+                       ev->area.x, ev->area.y, ev->area.x, ev->area.y,
+                       ev->area.width, ev->area.height);
       cleared = FALSE;
     } else {
       if (!cleared) {
Index: client/gui-xaw/mapview.c
===================================================================
--- client/gui-xaw/mapview.c    (revision 11123)
+++ client/gui-xaw/mapview.c    (working copy)
@@ -349,9 +349,12 @@
      * any pending updates, to make sure only the most up-to-date data
      * is written (otherwise drawing bugs happen when old data is copied
      * to screen).  Then we draw all changed areas to the screen. */
-    dirty_rect(event->xexpose.x, event->xexpose.y,
-              event->xexpose.width, event->xexpose.height);
-    unqueue_mapview_updates(TRUE);
+    unqueue_mapview_updates(FALSE);
+    XCopyArea(display, map_canvas_store, XtWindow(map_canvas),
+             civ_gc,
+             event->xexpose.x, event->xexpose.y,
+             event->xexpose.width, event->xexpose.height,
+             event->xexpose.x, event->xexpose.y);
   }
   refresh_overview_canvas();
 }
Index: client/gui-win32/mapview.c
===================================================================
--- client/gui-win32/mapview.c  (revision 11123)
+++ client/gui-win32/mapview.c  (working copy)
@@ -97,8 +97,9 @@
      * any pending updates, to make sure only the most up-to-date data
      * is written (otherwise drawing bugs happen when old data is copied
      * to screen).  Then we draw all changed areas to the screen. */
-    dirty_rect(x, y, width, height);
-    unqueue_mapview_updates(TRUE);
+    unqueue_mapview_updates(FALSE);
+    canvas_copy(get_mapview_window(), mapview.store, x, y, x, y,
+               width, height);
   }
 } 
 

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