]> git.draconx.ca Git - rrace.git/blobdiff - src/motif_ui.c
Improve exposure mask calculation.
[rrace.git] / src / motif_ui.c
index 718375ce411bb4dd416e3482e2dc199743486133..3edd3aba3cf4964074b48217fb568aa6773e30f4 100644 (file)
@@ -262,10 +262,10 @@ static uint_fast32_t
 expose_mask(int rect_x, int rect_y, int rect_w, int rect_h,
                                     int tile_w, int tile_h)
 {
-       return board_right(rect_x / tile_w)
-            & board_below(rect_y / tile_h)
-            & board_above((rect_y + rect_h - 1) / tile_h)
-            & board_left((rect_x + rect_w - 1) / tile_w);
+       return board_rect( rect_x/tile_w,
+                          rect_y/tile_h,
+                         (rect_x+rect_w-1)/tile_w,
+                         (rect_y+rect_h-1)/tile_h );
 }
 
 static void game_resize(Widget w, void *data, void *cb_data)