Let -sweepPromotions also work for click-click moves
authorH.G. Muller <h.g.muller@hccnet.nl>
Mon, 4 Jul 2011 09:06:12 +0000 (11:06 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Mon, 4 Jul 2011 10:54:31 +0000 (12:54 +0200)
commitfd1213c4557770ea82b25e443230345f50dfb97c
treeb6c990dbe11720948c0490d1c84fd1f53b539a87
parentfd1000efa5cb589e1446a4e1cfb0b4d222b0f65d
Let -sweepPromotions also work for click-click moves

A click-click promotion no longer causes auto-queening, but the down-click
on the to-square causes a Queen to stick to the mouse pointer, and then
allows the user to change it through dragging backwards before releasing it
with an up-click.
  In WinBoard this required a slight change in DragPieceBegin, because
the dragged piece there only was made visible when the mouse pointer
actually started moving (and dragInfo.pos was set), presumably under the
assumption that before mouse move the piece was already on the clicked
square. Which in the case of a to-square was of course not true. (Because
a piece jumps to the mouse pointer when the click is not centered on a
square, this gives less jittery static clicks.) So DragPieceBegin has
been given an extra argument now, to indicate whether it should attach
the piece to the mouse pointer immediately.
  To make the click-click sweepPromotions work in Shogi (for which the
drag-drop sweepPromotions could never work, because it is not clear the
piece has a posibility to promote when you pick it up), translation of
the sweep-selected piece to a Shogi promoChar had to e added.
backend.c
backend.h
frontend.h
winboard/winboard.c
xboard.c