X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=097cb85e05fc58faa0a3fd98f8002ac4f1046b4f;hb=1059c12cf5d52a4f1934ab40e0d92801fdc5988f;hp=80db3980ec7cef890d92a0eb9f7c4c63ea8857bf;hpb=919bb8ce56406c6059ec9d3221d1bc96ad388d1c;p=xboard.git diff --git a/xboard.c b/xboard.c index 80db398..097cb85 100644 --- a/xboard.c +++ b/xboard.c @@ -4708,6 +4708,8 @@ CoDrag (Widget sh, WindowPlacement *wp) XtSetValues(sh, args, j); } +static XtIntervalId delayedDragID = 0; + void DragProc () { @@ -4721,13 +4723,13 @@ DragProc () if(GameListIsUp()) CoDrag(gameListShell, &wpGameList); wpMain = wpNew; XDrawPosition(boardWidget, True, NULL); + delayedDragID = 0; // now drag executed, make sure next DelayedDrag will not cancel timer event (which could now be used by other) } void DelayedDrag () { - static XtIntervalId delayedDragID = 0; if(delayedDragID) XtRemoveTimeOut(delayedDragID); // cancel pending delayedDragID = XtAppAddTimeOut(appContext, 50, (XtTimerCallbackProc) DragProc, (XtPointer) 0); // and schedule new one 50 msec later