From: H.G. Muller Date: Thu, 16 Feb 2012 13:09:54 +0000 (+0100) Subject: Fix button grab for sweep selection X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=9f38943ff6f8f1dfbaf08fc8184b6bc93de15702;p=xboard.git Fix button grab for sweep selection The piece-menu initialization limited the grab of button events to those occurring inside the board window (presumably intended to limit them to the piece menu, but that does not pop up in sweep-selection mode). This is now suppressed when -pieceMenu is off, so that selection continues outside the the board. (Which is very convenient for pieces pu close to the edge.) --- diff --git a/xboard.c b/xboard.c index 6503c29..2efea90 100644 --- a/xboard.c +++ b/xboard.c @@ -4084,6 +4084,7 @@ CreatePieceMenus () whitePieceMenu = CreatePieceMenu("menuW", 0); blackPieceMenu = CreatePieceMenu("menuB", 1); + if(appData.pieceMenu) // [HGM] sweep: no idea what this was good for, but it stopped reporting button events outside the window XtRegisterGrabAction(PieceMenuPopup, True, (unsigned)(ButtonPressMask|ButtonReleaseMask), GrabModeAsync, GrabModeAsync);