X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=69079be7784cc0632035aee73aabc0272149b37f;hb=190cfda76b87b10514aa45bac061c3d4828ceffe;hp=c6f0c80416afe93c661bc641b12a8ee862569aed;hpb=31bf5c6c82c9bc0f3aa58c7ea49ece2fd5c66e16;p=xboard.git diff --git a/xboard.c b/xboard.c index c6f0c80..69079be 100644 --- a/xboard.c +++ b/xboard.c @@ -1724,7 +1724,7 @@ CoDrag (Widget sh, WindowPlacement *wp) void ReSize (WindowPlacement *wp) { - int sqx, sqy; + int sqx, sqy, w, h; if(wp->width == wpMain.width && wp->height == wpMain.height) return; // not sized sqx = (wp->width - lineGap - marginW) / BOARD_WIDTH - lineGap; sqy = (wp->height - lineGap - marginH) / BOARD_HEIGHT - lineGap; @@ -1734,6 +1734,10 @@ ReSize (WindowPlacement *wp) CreatePNGPieces(); // make newly scaled pieces InitDrawingSizes(0, 0); // creates grid etc. } else ResizeBoardWindow(BOARD_WIDTH * (squareSize + lineGap) + lineGap, BOARD_HEIGHT * (squareSize + lineGap) + lineGap, 0); + w = BOARD_WIDTH * (squareSize + lineGap) + lineGap; + h = BOARD_HEIGHT * (squareSize + lineGap) + lineGap; + if(optList[W_BOARD].max > w) optList[W_BOARD].max = w; + if(optList[W_BOARD].value > h) optList[W_BOARD].value = h; } static XtIntervalId delayedDragID = 0;