]> Dogcows Code - chaz/openbox/blobdiff - openbox/frame.c
fix a long-lurknig gravity bug
[chaz/openbox] / openbox / frame.c
index 05ac3c711535ffda022b467dc0c2107fd00ebb6b..19ee3297f2b4d6aeb594da389b0e8ca773b2b7de 100644 (file)
@@ -2,6 +2,7 @@
 #include "client.h"
 #include "openbox.h"
 #include "extensions.h"
+#include "config.h"
 #include "framerender.h"
 #include "render/theme.h"
 
@@ -429,7 +430,7 @@ static void layout_title(ObFrame *self)
 
     /* figure out whats being shown, and the width of the label */
     self->label_width = self->width - (ob_rr_theme->bevel + 1) * 2;
-    for (lc = ob_rr_theme->title_layout; *lc != '\0'; ++lc) {
+    for (lc = config_title_layout; *lc != '\0'; ++lc) {
        switch (*lc) {
        case 'N':
             if (n) { *lc = ' '; break; } /* rm duplicates */
@@ -487,7 +488,7 @@ static void layout_title(ObFrame *self)
     if (!c) XUnmapWindow(ob_display, self->close);
 
     x = ob_rr_theme->bevel + 1;
-    for (lc = ob_rr_theme->title_layout; *lc != '\0'; ++lc) {
+    for (lc = config_title_layout; *lc != '\0'; ++lc) {
        switch (*lc) {
        case 'N':
            if (!n) break;
@@ -683,16 +684,16 @@ void frame_frame_gravity(ObFrame *self, int *x, int *y)
     switch (self->client->gravity) {
     default:
     case NorthWestGravity:
-    case WestGravity:
-    case SouthWestGravity:
-       break;
     case NorthGravity:
+    case NorthEastGravity:
+       break;
+    case WestGravity:
     case CenterGravity:
-    case SouthGravity:
+    case EastGravity:
        *y += (self->size.top + self->size.bottom) / 2;
        break;
-    case NorthEastGravity:
-    case EastGravity:
+    case SouthWestGravity:
+    case SouthGravity:
     case SouthEastGravity:
        *y += self->size.top + self->size.bottom;
        break;
This page took 0.023702 seconds and 4 git commands to generate.