changeset 3209:d689396e814e

Fixed #294: Added handling of tag proc
author unexist
date Wed, 23 May 2012 01:44:10 +0200
parents fead825416ef
children 8e428e825838
files src/subtle/client.c src/subtle/tag.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/subtle/client.c	Wed May 23 01:43:43 2012 +0200
+++ b/src/subtle/client.c	Wed May 23 01:44:10 2012 +0200
@@ -898,6 +898,10 @@
           if(v->tags & (1L << (tag + 1)) || t->flags & SUB_CLIENT_MODE_STICK)
             if(t->flags & SUB_TAG_GRAVITY) c->gravities[i] = t->gravityid;
         }
+
+      /* Call proc if any */
+      if(t->flags & SUB_TAG_PROC)
+        subRubyCall(SUB_CALL_HOOKS, t->proc, (void *)c);
     }
 } /* }}} */
 
--- a/src/subtle/tag.c	Wed May 23 01:43:43 2012 +0200
+++ b/src/subtle/tag.c	Wed May 23 01:44:10 2012 +0200
@@ -241,6 +241,10 @@
       subArrayKill(t->matcher, False);
     }
 
+  /* Remove proc */
+  if(t->flags & SUB_TAG_PROC)
+    subRubyRelease(t->proc);
+
   free(t->name);
   free(t);