X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwlayout.c;h=c308fb333ee9cba7743a5f695c5c98faa8da06cf;hb=c0bcf53dc4abc3fc4001252c734b926765598837;hp=08f461fb8c3e92f6eff18a7f09588411cd3fd214;hpb=f4b62dcdc66f6b278439684a79170480f0c66efe;p=xboard.git diff --git a/winboard/wlayout.c b/winboard/wlayout.c index 08f461f..c308fb3 100644 --- a/winboard/wlayout.c +++ b/winboard/wlayout.c @@ -5,6 +5,9 @@ * * Copyright 2005 Alessandro Scotti * + * Enhancements Copyright 2009, 2012, 2013, 2014, 2015, 2016 Free + * Software Foundation, Inc. + * * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -173,15 +176,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