X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=df136bf29a586cf5a3b611f051ac335e58980bc9;hb=f14d74a3acf9d29fb9b4219d1f418a416d0fa612;hp=9667a6f941a383864d732a1a0d3e9cb3692cc6ae;hpb=af1ac846ccb5fab8a3c83d8688db3d3f96f5a98b;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index 9667a6f9..df136bf2 100644 --- a/src/client.cc +++ b/src/client.cc @@ -756,9 +756,13 @@ void Client::toggleClientBorder(bool addborder) // reversed. int x = _area.x(), y = _area.y(); switch(_gravity) { + default: case NorthWestGravity: case WestGravity: case SouthWestGravity: + case NorthGravity: + case CenterGravity: + case SouthGravity: break; case NorthEastGravity: case EastGravity: @@ -766,11 +770,20 @@ void Client::toggleClientBorder(bool addborder) if (addborder) x -= _border_width * 2; else x += _border_width * 2; break; + case ForgetGravity: + case StaticGravity: + if (addborder) x -= _border_width; + else x += _border_width; + break; } switch(_gravity) { + default: case NorthWestGravity: + case WestGravity: case NorthGravity: + case CenterGravity: case NorthEastGravity: + case EastGravity: break; case SouthWestGravity: case SouthGravity: @@ -778,8 +791,10 @@ void Client::toggleClientBorder(bool addborder) if (addborder) y -= _border_width * 2; else y += _border_width * 2; break; - default: - // no change for StaticGravity etc. + case ForgetGravity: + case StaticGravity: + if (addborder) y -= _border_width; + else y += _border_width; break; } _area.setPos(x, y);