]> git.zerfleddert.de Git - micropolis/commitdiff
Optimize redrawing so that the mouse is more responsive, from Marc Espie.
authorMichael Gernoth <michael@gernoth.net>
Sun, 27 Jan 2008 19:12:58 +0000 (20:12 +0100)
committerMichael Gernoth <michael@gernoth.net>
Sun, 27 Jan 2008 19:12:58 +0000 (20:12 +0100)
Fixes sluggish mouse behavior.
Forwarded by Deanna Phillips.

src/sim/w_tk.c

index ceed33ad6e8bf7762e47d65684f1835758a6c1e9..027654dbd297096ac841b16b56cafe4860adc810 100644 (file)
@@ -475,8 +475,8 @@ TileViewEventProc(ClientData clientData, XEvent *eventPtr)
 /* XXX: redraw all views showing cursor */
 /* XXX: also, make sure switching tools works w/out moving */
     if (((view->tool_showing != last_showing) ||
 /* XXX: redraw all views showing cursor */
 /* XXX: also, make sure switching tools works w/out moving */
     if (((view->tool_showing != last_showing) ||
-        (view->tool_x != last_x) ||
-        (view->tool_y != last_y))) {
+        ((view->tool_x >> 4) != (last_x >> 4)) ||
+        ((view->tool_y >> 4)  != (last_y >> 4)))) {
 #if 1
       EventuallyRedrawView(view);
 #else
 #if 1
       EventuallyRedrawView(view);
 #else
Impressum, Datenschutz