X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.c;h=9d244c6a3abd0c4a655c76cf8e48a3e30838f734;hb=f795bf86b3011a5e0aa88493ce106ca93e664089;hp=49df8ee2466115a0bf5e8e41003cb1871b600f21;hpb=d397edb934a78bb4d0ceec02cd3768cc7244be99;p=xboard.git diff --git a/winboard/winboard.c b/winboard/winboard.c index 49df8ee..9d244c6 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -6275,6 +6275,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* [AS] Also move "attached" child windows */ case WM_WINDOWPOSCHANGING: + if( hwnd == hwndMain && appData.useStickyWindows ) { LPWINDOWPOS lpwp = (LPWINDOWPOS) lParam; @@ -6282,11 +6283,17 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Window is moving */ RECT rcMain; - GetWindowRect( hwnd, &rcMain ); +// GetWindowRect( hwnd, &rcMain ); //[HGM] sticky: in XP this returned new position, not old + rcMain.left = boardX; // replace by these 4 lines to reconstruct old rect + rcMain.right = boardX + winWidth; + rcMain.top = boardY; + rcMain.bottom = boardY + winHeight; ReattachAfterMove( &rcMain, lpwp->x, lpwp->y, moveHistoryDialog, &wpMoveHistory ); ReattachAfterMove( &rcMain, lpwp->x, lpwp->y, evalGraphDialog, &wpEvalGraph ); ReattachAfterMove( &rcMain, lpwp->x, lpwp->y, engineOutputDialog, &wpEngineOutput ); + boardX = lpwp->x; + boardY = lpwp->y; } } break;