X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=kub.c;fp=kub.c;h=a6b1f3ff02603f7c1648df0f702621ea11efda52;hb=700c1ef19a5819d3a9dea3108c5782a90b3919a8;hp=99c6f6b6a1f3cedf0b7ee64edc53c3fe948a584a;hpb=c9b1daea75c698a7722c5ba349f9f0cf6a5fcda4;p=kub diff --git a/kub.c b/kub.c index 99c6f6b..a6b1f3f 100644 --- a/kub.c +++ b/kub.c @@ -466,14 +466,14 @@ static gboolean on_button_motion_event (GtkWidget *widget, GdkEventMotion *event tile = &game->deck.tiles[game->current_tile]; /* First, invalidate the region where the tile currently is. */ - gtk_widget_queue_draw_area (widget, tile->x, tile->y, TILE_WIDTH, TILE_HEIGHT); + gtk_widget_queue_draw_area (widget, tile->x - 1, tile->y - 1, TILE_WIDTH + 1, TILE_HEIGHT + 2); /* Then, move the tile */ tile->x = event->x; tile->y = event->y; /* Finally, invalidate the region where the tile is now. */ - gtk_widget_queue_draw_area (widget, tile->x, tile->y, TILE_WIDTH, TILE_HEIGHT); + gtk_widget_queue_draw_area (widget, tile->x - 1, tile->y - 1, TILE_WIDTH + 1, TILE_HEIGHT + 2); return TRUE; }