X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwlayout.c;h=5b0e76b26c6e97ff9de92d10fa6bf160b86a69f7;hb=154e66c1503c1352990adf30fd7414936a8e4307;hp=08f461fb8c3e92f6eff18a7f09588411cd3fd214;hpb=f4b62dcdc66f6b278439684a79170480f0c66efe;p=xboard.git diff --git a/winboard/wlayout.c b/winboard/wlayout.c index 08f461f..5b0e76b 100644 --- a/winboard/wlayout.c +++ b/winboard/wlayout.c @@ -5,6 +5,8 @@ * * Copyright 2005 Alessandro Scotti * + * Enhancements Copyright 2009, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. + * * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -173,15 +175,15 @@ VOID ReattachAfterSize( LPRECT lprcOldPos, int new_w, int new_h, HWND hWndChild, /* Adjust size & placement */ if(pwpChild->x + pwpChild->width >= lprcOldPos->right && - (pwpChild->x + pwpChild->width < screenWidth - 5 || delta_x > 0) ) // keep right edge glued to display edge if touching + (pwpChild->x + pwpChild->width < screenGeometry.right - 5 || delta_x > 0) ) // keep right edge glued to display edge if touching pwpChild->width += delta_x; - if(pwpChild->x + pwpChild->width >= screenWidth ) // don't move right edge off screen - pwpChild->width = screenWidth - pwpChild->x; + if(pwpChild->x + pwpChild->width >= screenGeometry.right ) // don't move right edge off screen + pwpChild->width = screenGeometry.right - pwpChild->x; if(pwpChild->y + pwpChild->height >= lprcOldPos->bottom && - (pwpChild->y + pwpChild->height < screenHeight - 35 || delta_y > 0) ) // keep bottom edge glued to display edge if touching + (pwpChild->y + pwpChild->height < screenGeometry.bottom - 35 || delta_y > 0) ) // keep bottom edge glued to display edge if touching pwpChild->height += delta_y; - if(pwpChild->y + pwpChild->height >= screenHeight - 30 ) // don't move bottom edge off screen - pwpChild->height = screenHeight - 30 - pwpChild->y; + if(pwpChild->y + pwpChild->height >= screenGeometry.bottom - 30 ) // don't move bottom edge off screen + pwpChild->height = screenGeometry.bottom - 30 - pwpChild->y; if(pwpChild->x >= lprcOldPos->right) pwpChild->width -= delta_x, pwpChild->x += delta_x; if(pwpChild->y >= lprcOldPos->bottom) pwpChild->height -= delta_y, pwpChild->y += delta_y; if(pwpChild->width < 30) pwpChild->width = 30; // force minimum width