From 10d981a1f16cf0b7ae006e257d756030e116725f Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 21 Dec 2011 22:17:01 +0100 Subject: [PATCH] Fix switching back from mono-mode XB Suppressing unnecesary X-server calls in InitDrawingSizes had broken switching back from monoMode, because the animVars have to be recreated for that, and this was only done when the variant changed. --- xboard.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xboard.c b/xboard.c index 9170e7f..ecf421c 100644 --- a/xboard.c +++ b/xboard.c @@ -1686,7 +1686,7 @@ void InitDrawingSizes(BoardSize boardSize, int flags) int i; static Dimension oldWidth, oldHeight; static VariantClass oldVariant; - static int oldDual = -1; + static int oldDual = -1, oldMono = -1; if(!formWidget) return; @@ -1765,7 +1765,7 @@ void InitDrawingSizes(BoardSize boardSize, int flags) // [HGM] pieces: tailor piece bitmaps to needs of specific variant // (only for xpm) - if(gameInfo.variant == oldVariant) return; // and only if variant changed + if(gameInfo.variant != oldVariant) { // and only if variant changed if(useImages) { for(i=0; i<4; i++) { @@ -1833,9 +1833,12 @@ void InitDrawingSizes(BoardSize boardSize, int flags) } } } + } #if HAVE_LIBXPM + if(appData.monoMode == oldMono) CreateAnimVars(); #endif + oldMono = appData.monoMode; } #endif -- 1.7.0.4