all repos — openbox @ f14d74a3acf9d29fb9b4219d1f418a416d0fa612

openbox fork - make it a bit more like ryudo

test for borders on static grav windows
Dana Jansens danakj@orodu.net
commit

f14d74a3acf9d29fb9b4219d1f418a416d0fa612

parent

44358dfbaa66592da813ce84e88675dfa293384f

1 files changed, 17 insertions(+), 2 deletions(-)

jump to
M src/client.ccsrc/client.cc

@@ -756,9 +756,13 @@ // when re-adding the border to the client, the same operation needs to be

// 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 @@ case SouthEastGravity:

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 @@ case SouthEastGravity:

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);