Improve behavior of secondary board on sizing main window
authorH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 23 Mar 2016 10:07:43 +0000 (11:07 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Tue, 29 Mar 2016 14:51:34 +0000 (16:51 +0200)
Resizing the main window now immediately orders corresponding resizing
of the secondary board window, plus an immediate redraw, rather than
waiting for a move to occur on that board.

gtk/xboard.c

index 783b440..5e2314a 100644 (file)
@@ -1697,6 +1697,12 @@ ReSize (WindowPlacement *wp)
        if(optList[W_BOARD].max   > w) optList[W_BOARD].max = w;
        if(optList[W_BOARD].value > h) optList[W_BOARD].value = h;
        first = appData.fixedSize;
+       if(twoBoards && shellUp[DummyDlg]) {
+           SlavePopUp(); dualOptions[3].max = 0; DoEvents(); // calls SlaveResize, kludge to force assigning new canvas
+           partnerUp = !partnerUp; flipView = !flipView;
+           DrawPosition(True, NULL);
+           partnerUp = !partnerUp; flipView = !flipView;
+       }
 }
 
 static guint delayedDragTag = 0;