WinBoard multi-monitor support
[xboard.git] / winboard / wlayout.c
index 08f461f..0e9246e 100644 (file)
@@ -173,15 +173,15 @@ VOID ReattachAfterSize( LPRECT lprcOldPos, int new_w, int new_h, HWND hWndChild,
 \r
             /* Adjust size & placement */\r
             if(pwpChild->x + pwpChild->width  >= lprcOldPos->right &&\r
-              (pwpChild->x + pwpChild->width  < screenWidth - 5 || delta_x > 0) ) // keep right edge glued to display edge if touching\r
+              (pwpChild->x + pwpChild->width  < screenGeometry.right - 5 || delta_x > 0) ) // keep right edge glued to display edge if touching\r
                pwpChild->width += delta_x;\r
-            if(pwpChild->x + pwpChild->width  >= screenWidth  ) // don't move right edge off screen\r
-               pwpChild->width = screenWidth - pwpChild->x;\r
+            if(pwpChild->x + pwpChild->width  >= screenGeometry.right  ) // don't move right edge off screen\r
+               pwpChild->width = screenGeometry.right - pwpChild->x;\r
             if(pwpChild->y + pwpChild->height >= lprcOldPos->bottom &&\r
-              (pwpChild->y + pwpChild->height < screenHeight - 35 || delta_y > 0) ) // keep bottom edge glued to display edge if touching\r
+              (pwpChild->y + pwpChild->height < screenGeometry.bottom - 35 || delta_y > 0) ) // keep bottom edge glued to display edge if touching\r
                pwpChild->height += delta_y;\r
-            if(pwpChild->y + pwpChild->height >= screenHeight - 30 ) // don't move bottom edge off screen\r
-               pwpChild->height = screenHeight - 30 - pwpChild->y;\r
+            if(pwpChild->y + pwpChild->height >= screenGeometry.bottom - 30 ) // don't move bottom edge off screen\r
+               pwpChild->height = screenGeometry.bottom - 30 - pwpChild->y;\r
             if(pwpChild->x >= lprcOldPos->right)  pwpChild->width  -= delta_x, pwpChild->x += delta_x;\r
             if(pwpChild->y >= lprcOldPos->bottom) pwpChild->height -= delta_y, pwpChild->y += delta_y;\r
             if(pwpChild->width  < 30) pwpChild->width = 30;  // force minimum width\r