rem: if (wPreferences.move_display == WDIS_NEW) {  showPosition(wwin, data->realX, data->realY);  }
context: updateWindowPosition(WWindow *wwin, MoveData *data, Bool doResistance,		     Bool opaqueMove, int newMouseX, int newMouseY){    WScreen *scr = wwin->screen_ptr;    int dx, dy;			       /* how much mouse moved */    int winL, winR, winT, winB;	       /* requested new window position */    int newX, newY;		       /* actual new window position */    Bool hresist, vresist;    Bool updateIndex;    hresist = False;    vresist = False;    updateIndex = False;    /* check the direction of the movement */    dx = newMouseX - data->mouseX;    dy = newMouseY - data->mouseY;    data->omouseX = data->mouseX;    data->omouseY = data->mouseY;    data->mouseX = newMouseX;    data->mouseY = newMouseY;    winL = data->calcX + dx;    winR = data->calcX + data->winWidth + dx;    winT = data->calcY + dy;    winB = data->calcY + data->winHeight + dy;    newX = data->realX;    newY = data->realY;    if (doResistance) {	int edge;	int resist;	WWindow *rwin;	resist = wPreferences.edge_resistance;	/* horizontal movement: check horizontal edge resistances */	if (dx < 0) {	    /* window is the leftmost window: check against screen edge */	    edge = scr->totalUsableArea.x1;	    /* check position of nearest window to the left */	    if (data->rightIndex > 0) {		/* there is some window at the left: check if it will block		 * the window */		rwin = data->rightList[data->rightIndex - 1];		if (data->realY > WBOTTOM(rwin) 		    || (data->realY + data->winHeight) < WTOP(rwin)) {		    resist = 0;		} else {		    edge = WRIGHT(rwin) + 1;		    resist = WIN_RESISTANCE(wPreferences.edge_resistance);		}	    }	    if (resist > 0 && winL >= edge - resist && winL <= edge) {		newX = edge;		hresist = True;	    }	} else if (dx > 0) {	    /* window is the rightmost window: check against screen edge */	    edge = scr->totalUsableArea.x2;	    /* check position of nearest window to the right */	    if (data->leftIndex > 0) {		/* there is some window at the right: check if it will block		 * the window */		rwin = data->leftList[data->leftIndex - 1];		if (data->realY > WBOTTOM(rwin) 		    || (data->realY + data->winHeight) < WTOP(rwin)) {		    resist = 0;		} else {		    edge = WLEFT(rwin);		    resist = WIN_RESISTANCE(wPreferences.edge_resistance);		}	    }	    if (resist > 0 && winR <= edge + resist && winR >= edge) {		newX = edge - data->winWidth;		hresist = True;	    }	}	resist = wPreferences.edge_resistance;	/* vertical movement: check vertical edge resistances */	if (dy < 0) {	    /* window is the topmost window: check against screen edge */	    edge = scr->totalUsableArea.y1;	    /* check position of nearest window to the top */	    if (data->bottomIndex > 0) {		/* there is some window at the top: check if it will block		 * the window */		rwin = data->bottomList[data->bottomIndex - 1];		if (data->realX > WRIGHT(rwin) 		    || (data->realX + data->winWidth) < WLEFT(rwin)) {		    resist = 0;		} else {		    edge = WBOTTOM(rwin) + 1;		    resist = WIN_RESISTANCE(wPreferences.edge_resistance);		}	    }	    if (resist > 0 && winT >= edge - resist && winT <= edge) {		newY = edge;		vresist = True;	    }	} else if (dy > 0) {	    /* window is the bottommost window: check against screen edge */	    edge = scr->totalUsableArea.y2;	    /* check position of nearest window to the bottom */	    if (data->topIndex > 0) {		/* there is some window at the bottom: check if it will block		 * the window */		rwin = data->topList[data->topIndex - 1];		if (data->realX > WRIGHT(rwin) 		    || (data->realX + data->winWidth) < WLEFT(rwin)) {		    resist = 0;		} else {		    edge = WTOP(rwin);		    resist = WIN_RESISTANCE(wPreferences.edge_resistance);		}	    }	    if (resist > 0 && winB <= edge + resist && winB >= edge) {		newY = edge - data->winHeight;		vresist = True;	    }	}    }    /* update window position */    data->calcX += dx;    data->calcY += dy;    if (((dx > 0 && data->calcX - data->realX > 0)	 || (dx < 0 && data->calcX - data->realX < 0)) && !hresist)	newX = data->calcX;    if (((dy > 0 && data->calcY - data->realY > 0)	 || (dy < 0 && data->calcY - data->realY < 0)) && !vresist)	newY = data->calcY;    if (data->realX != newX || data->realY != newY) {	if (opaqueMove) {	    doWindowMove(wwin, scr->selected_windows,			 newX - wwin->frame_x,			 newY - wwin->frame_y);	} else {	    /* erase frames */	    drawFrames(wwin, scr->selected_windows, 		       data->realX - wwin->frame_x,		       data->realY - wwin->frame_y);	}		if (!scr->selected_windows	    && wPreferences.move_display == WDIS_FRAME_CENTER) {			    moveGeometryDisplayCentered(scr, newX + data->winWidth/2, 					newY + data->winHeight/2);	}	if (!opaqueMove) {	    /* draw frames */	    drawFrames(wwin, scr->selected_windows, 		       newX - wwin->frame_x,		       newY - wwin->frame_y);	}	if (!scr->selected_windows) {	    if (wPreferences.move_display == WDIS_NEW) {		showPosition(wwin, data->realX, data->realY);			    }	    showPosition(wwin, newX, newY);	}    }    /* recalc relative window position */    if (doResistance && (data->realX != newX || data->realY != newY)) {	updateResistance(wwin, data, newX, newY);    }    data->realX = newX;    data->realY = newY;}