]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
centered gravities lose one borderwidth when mapping too
[chaz/openbox] / src / client.cc
index 603a08bdecc43276e6697ff2548e9fe7338c095b..d005a0bdaad5acf032c5c04ea9bec24170bfa427 100644 (file)
@@ -99,10 +99,10 @@ void Client::getGravity()
   long junk;
 
   if (XGetWMNormalHints(**otk::display, _window, &size, &junk) &&
-      size.flags & PWinGravity)
+      size.flags & PWinGravity) {
     // first try the normal hints
     _gravity = size.win_gravity;
-  else {
+  else {
     // then fall back to the attribute
     ret = XGetWindowAttributes(**otk::display, _window, &wattrib);
     assert(ret != BadWindow);
@@ -780,9 +780,6 @@ void Client::toggleClientBorder(bool addborder)
   case NorthWestGravity:
   case WestGravity:
   case SouthWestGravity:
-  case NorthGravity:
-  case CenterGravity:
-  case SouthGravity:
     break;
   case NorthEastGravity:
   case EastGravity:
@@ -790,6 +787,9 @@ void Client::toggleClientBorder(bool addborder)
     if (addborder) x -= _border_width * 2;
     else           x += _border_width * 2;
     break;
+  case NorthGravity:
+  case SouthGravity:
+  case CenterGravity:
   case ForgetGravity:
   case StaticGravity:
     if (addborder) x -= _border_width;
@@ -799,11 +799,8 @@ void Client::toggleClientBorder(bool addborder)
   switch(_gravity) {
   default:
   case NorthWestGravity:
-  case WestGravity:
   case NorthGravity:
-  case CenterGravity:
   case NorthEastGravity:
-  case EastGravity:
     break;
   case SouthWestGravity:
   case SouthGravity:
@@ -811,6 +808,9 @@ void Client::toggleClientBorder(bool addborder)
     if (addborder) y -= _border_width * 2;
     else           y += _border_width * 2;
     break;
+  case WestGravity:
+  case EastGravity:
+  case CenterGravity:
   case ForgetGravity:
   case StaticGravity:
     if (addborder) y -= _border_width;
This page took 0.021113 seconds and 4 git commands to generate.