]> Dogcows Code - chaz/openbox/blobdiff - openbox/frame.c
add suppot for showing pixmap masks in menus where the rgba icons go too
[chaz/openbox] / openbox / frame.c
index a38bcfbed5d084f49902a34a9149a3fa2f77d294..37470e3cc15e678fa68df450fb1c4ac8c62a6826 100644 (file)
@@ -213,6 +213,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
 {
     if (resized) {
         self->decorations = self->client->decorations;
+        self->max_horz = self->client->max_horz;
 
         if (self->decorations & OB_FRAME_DECOR_BORDER) {
             self->bwidth = ob_rr_theme->bwidth;
@@ -222,10 +223,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
         }
         self->rbwidth = self->bwidth;
 
-        if (self->client->max_vert && self->client->max_horz)
-            self->decorations &= ~OB_FRAME_DECOR_HANDLE;
-
-        if (self->client->max_horz)
+        if (self->max_horz)
             self->bwidth = self->cbwidth_x = 0;
 
         STRUT_SET(self->innersize,
@@ -234,7 +232,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
                   self->cbwidth_x,
                   self->cbwidth_y);
         self->width = self->client->area.width + self->cbwidth_x * 2 -
-            (self->client->max_horz ? self->rbwidth * 2 : 0);
+            (self->max_horz ? self->rbwidth * 2 : 0);
         self->width = MAX(self->width, 1); /* no lower than 1 */
 
         /* set border widths */
@@ -340,7 +338,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
                  self->client->area.width +
                  self->size.left + self->size.right,
                  (self->client->shaded ?
-                   ob_rr_theme->title_height + self->bwidth*2:
+                   ob_rr_theme->title_height + self->rbwidth * 2:
                    self->client->area.height +
                    self->size.top + self->size.bottom));
 
@@ -603,8 +601,8 @@ static void layout_title(ObFrame *self)
 
 ObFrameContext frame_context_from_string(char *name)
 {
-    if (!g_ascii_strcasecmp("root", name))
-        return OB_FRAME_CONTEXT_ROOT;
+    if (!g_ascii_strcasecmp("desktop", name))
+        return OB_FRAME_CONTEXT_DESKTOP;
     else if (!g_ascii_strcasecmp("client", name))
         return OB_FRAME_CONTEXT_CLIENT;
     else if (!g_ascii_strcasecmp("titlebar", name))
@@ -640,22 +638,23 @@ ObFrameContext frame_context(ObClient *client, Window win)
 {
     ObFrame *self;
 
-    if (win == RootWindow(ob_display, ob_screen)) return OB_FRAME_CONTEXT_ROOT;
+    if (win == RootWindow(ob_display, ob_screen))
+        return OB_FRAME_CONTEXT_DESKTOP;
     if (client == NULL) return OB_FRAME_CONTEXT_NONE;
     if (win == client->window) {
-        /* conceptually, this is the root window, as far as users are
+        /* conceptually, this is the desktop, as far as users are
            concerned */
         if (client->type == OB_CLIENT_TYPE_DESKTOP)
-            return OB_FRAME_CONTEXT_ROOT;
+            return OB_FRAME_CONTEXT_DESKTOP;
         return OB_FRAME_CONTEXT_CLIENT;
     }
 
     self = client->frame;
     if (win == self->plate) {
-        /* conceptually, this is the root window, as far as users are
+        /* conceptually, this is the desktop, as far as users are
            concerned */
         if (client->type == OB_CLIENT_TYPE_DESKTOP)
-            return OB_FRAME_CONTEXT_ROOT;
+            return OB_FRAME_CONTEXT_DESKTOP;
         return OB_FRAME_CONTEXT_CLIENT;
     }
 
This page took 0.022302 seconds and 4 git commands to generate.