X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxboard.c;h=78fa0f60097f89d287cf8f437b6596bbb5366128;hb=6b57f854463218f4adfc0b1eaf37eb275e35f893;hp=0d04c5b5742593be80da2f8a41e4b2c81d186de6;hpb=c172f0cc52bcf9d4433149de82290c2941136180;p=xboard.git diff --git a/gtk/xboard.c b/gtk/xboard.c index 0d04c5b..78fa0f6 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -1647,10 +1647,13 @@ ReSize (WindowPlacement *wp) if(sqy < sqx) sqx = sqy; if(sqx < 20) return; if(appData.overrideLineGap < 0) { // do second iteration with adjusted lineGap + int oldSqx = sqx; lg = lineGap = sqx < 37 ? 1 : sqx < 59 ? 2 : sqx < 116 ? 3 : 4; sqx = (wp->width - lg - marginW) / BOARD_WIDTH - lg; sqy = (wp->height - lg - marginH - hc) / BOARD_HEIGHT - lg; if(sqy < sqx) sqx = sqy; + lg = sqx < 37 ? 1 : sqx < 59 ? 2 : sqx < 116 ? 3 : 4; + if(sqx == oldSqx + 1 && lg == lineGap + 1) sqx = oldSqx, squareSize = 0; // prevent oscillations, force resize by kludge } if(sqx != squareSize) { squareSize = sqx; // adopt new square size