changeset 3149:fc4142ae9281

Fixed #272: Fixed color selection
author unexist
date Sun, 11 Dec 2011 16:59:44 +0100
parents 5fb6ddbed9d0
children 4b44298da6b9
files src/subtle/panel.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/subtle/panel.c	Sun Dec 11 16:54:40 2011 +0100
+++ b/src/subtle/panel.c	Sun Dec 11 16:59:44 2011 +0100
@@ -100,13 +100,14 @@
     {
       SubStyle *style = NULL;
 
+      subStyleReset(s, -1);
+
       /* Pick base style */
       if(!(style = subArrayGet(subtle->styles.views.styles, v->style)))
         {
           if(subtle->styles.focus && focus)
             style = subtle->styles.focus;
-          else if(subtle->styles.occupied &&
-              subtle->client_tags & v->tags)
+          else if(subtle->styles.occupied && subtle->client_tags & v->tags)
             style = subtle->styles.occupied;
         }
 
@@ -261,7 +262,8 @@
         if(0 < subtle->views->ndata)
           {
             int i;
-            SubStyle s = { -1, .border = { -1 }, .padding = { -1 }, .margin = { -1 }};
+            SubStyle s = { -1, .flags = SUB_TYPE_STYLE, .border = { -1 },
+              .padding = { -1 }, .margin = { -1 }};
 
             /* Update for each view */
             for(i = 0; i < subtle->views->ndata; i++)
@@ -407,7 +409,8 @@
         if(0 < subtle->views->ndata)
           {
             int i, vx = p->x;
-            SubStyle s = { -1, .border = { -1 }, .padding = { -1 }, .margin = { -1 }};
+            SubStyle s = { -1, .flags = SUB_TYPE_STYLE, .border = { -1 },
+              .padding = { -1 }, .margin = { -1 }};
 
             /* View buttons */
             for(i = 0; i < subtle->views->ndata; i++)