X-Git-Url: http://hgm.nubati.net/cgi-bin/gitweb.cgi?p=xboard.git;a=blobdiff_plain;f=backend.c;h=0e0f80eec18f95d78e9a46defdb1b336a71bd612;hp=f449d2610c8620914ddc25f682f2d9cb80145a7a;hb=2cbef99e7202b7af01c5fef277501fc5baa7b50a;hpb=deb3473452a674b82d27b03fcf7e570c1cb03841;ds=sidebyside diff --git a/backend.c b/backend.c index f449d261..0e0f80ee 100644 --- a/backend.c +++ b/backend.c @@ -7169,13 +7169,17 @@ void HoverEvent (int xPix, int yPix, int x, int y) { static char baseMarker[BOARD_RANKS][BOARD_FILES], baseLegal[BOARD_RANKS][BOARD_FILES]; + static int oldX = -1, oldY = -1, oldFromX = -1, oldFromY = -1; int r, f; if(dragging == 2) DragPieceMove(xPix, yPix); // [HGM] lion: drag without button for second leg if(!first.highlight) return; - if(hiX == -1 && hiY == -1 && x == fromX && y == fromY) // record markings + if(fromX != oldFromX || fromY != oldFromY) oldX = oldY = -1; // kludge to fake entry on from-click + if(x == oldX && y == oldY) return; // only do something if we enter new square + oldFromX = fromX; oldFromY = fromY; + if(oldX == -1 && oldY == -1 && x == fromX && y == fromY) // record markings after from-change for(r=0; r