Fix alignment of highlight expose
[xboard.git] / draw.c
diff --git a/draw.c b/draw.c
index 45a332c..25965cb 100644 (file)
--- a/draw.c
+++ b/draw.c
@@ -141,17 +141,6 @@ SwitchWindow ()
     csDualBoard = cstmp;
 }
 
-void
-NewSurfaces ()
-{
-return;
-    // delete surfaces after size becomes invalid, so they will be recreated
-    if(csBoardWindow) cairo_surface_destroy(csBoardWindow);
-    if(csBoardBackup) cairo_surface_destroy(csBoardBackup);
-    if(csDualBoard) cairo_surface_destroy(csDualBoard);
-    csBoardWindow = csBoardBackup = csDualBoard = NULL;
-}
-
 #define BoardSize int
 void
 InitDrawingSizes (BoardSize boardSize, int flags)
@@ -176,7 +165,6 @@ InitDrawingSizes (BoardSize boardSize, int flags)
 
     oldWidth = boardWidth; oldHeight = boardHeight;
     CreateGrid();
-    NewSurfaces();
 
     /*
      * Inhibit shell resizing.
@@ -528,7 +516,7 @@ DrawBorder (int x, int y, int type)
     SetPen(cr, lineGap, col, 0);
     cairo_stroke(cr);
     cairo_destroy(cr);
-    DrawExpose(NULL, x, y, squareSize+2*lineGap, squareSize+2*lineGap);
+    DrawExpose(NULL, x - lineGap/2, y - lineGap/2, squareSize+2*lineGap, squareSize+2*lineGap);
 }
 
 static int