test for borders on static grav windows

This commit is contained in:
Dana Jansens 2003-01-17 02:11:11 +00:00
parent 44358dfbaa
commit f14d74a3ac

View file

@ -756,9 +756,13 @@ void Client::toggleClientBorder(bool addborder)
// reversed. // reversed.
int x = _area.x(), y = _area.y(); int x = _area.x(), y = _area.y();
switch(_gravity) { switch(_gravity) {
default:
case NorthWestGravity: case NorthWestGravity:
case WestGravity: case WestGravity:
case SouthWestGravity: case SouthWestGravity:
case NorthGravity:
case CenterGravity:
case SouthGravity:
break; break;
case NorthEastGravity: case NorthEastGravity:
case EastGravity: case EastGravity:
@ -766,11 +770,20 @@ void Client::toggleClientBorder(bool addborder)
if (addborder) x -= _border_width * 2; if (addborder) x -= _border_width * 2;
else x += _border_width * 2; else x += _border_width * 2;
break; break;
case ForgetGravity:
case StaticGravity:
if (addborder) x -= _border_width;
else x += _border_width;
break;
} }
switch(_gravity) { switch(_gravity) {
default:
case NorthWestGravity: case NorthWestGravity:
case WestGravity:
case NorthGravity: case NorthGravity:
case CenterGravity:
case NorthEastGravity: case NorthEastGravity:
case EastGravity:
break; break;
case SouthWestGravity: case SouthWestGravity:
case SouthGravity: case SouthGravity:
@ -778,8 +791,10 @@ void Client::toggleClientBorder(bool addborder)
if (addborder) y -= _border_width * 2; if (addborder) y -= _border_width * 2;
else y += _border_width * 2; else y += _border_width * 2;
break; break;
default: case ForgetGravity:
// no change for StaticGravity etc. case StaticGravity:
if (addborder) y -= _border_width;
else y += _border_width;
break; break;
} }
_area.setPos(x, y); _area.setPos(x, y);