remove NewSurfaces
authorH.G. Muller <h.g.muller@hccnet.nl>
Wed, 10 Oct 2012 15:19:52 +0000 (17:19 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sun, 21 Oct 2012 09:28:18 +0000 (11:28 +0200)
draw.c
xboard.c

diff --git a/draw.c b/draw.c
index 45a332c..34b525c 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.
index 54f9953..1d0de9f 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -1745,7 +1745,6 @@ ReSize (WindowPlacement *wp)
        if(sqy < sqx) sqx = sqy;
        if(sqx != squareSize) {
            squareSize = sqx; // adopt new square size
-           NewSurfaces();
            CreatePNGPieces(); // make newly scaled pieces
            InitDrawingSizes(0, 0); // creates grid etc.
        } else ResizeBoardWindow(BOARD_WIDTH * (squareSize + lineGap) + lineGap, BOARD_HEIGHT * (squareSize + lineGap) + lineGap, 0);