changeset 3242:4b3ad4a625ee

Added rename hook
author unexist
date Fri, 15 Dec 2017 13:49:12 +0100
parents 71c757f2a3c4
children e0fa4e26fae5
files src/subtle/event.c src/subtle/ruby.c src/subtle/subtle.h
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/subtle/event.c	Wed Jun 19 15:12:38 2013 +0200
+++ b/src/subtle/event.c	Fri Dec 15 13:49:12 2017 +0100
@@ -1501,6 +1501,10 @@
                 subScreenUpdate();
                 subScreenRender();
               }
+
+            /* Hook: Rename */
+            subHookCall((SUB_HOOK_TYPE_CLIENT|SUB_HOOK_ACTION_RENAME),
+              (void *)c);
           }
         break; /* }}} */
       case SUB_EWMH_WM_NORMAL_HINTS: /* {{{ */
@@ -1578,7 +1582,7 @@
 #endif
 } /* }}} */
 
-/* EventSelft on heection {{{ */
+/* EventSelection {{{ */
 void
 EventSelection(XSelectionClearEvent *ev)
 {
--- a/src/subtle/ruby.c	Wed Jun 19 15:12:38 2013 +0200
+++ b/src/subtle/ruby.c	Fri Dec 15 13:49:12 2017 +0100
@@ -565,6 +565,7 @@
     { CHAR2SYM("client_mode"),    (SUB_HOOK_TYPE_CLIENT|SUB_HOOK_ACTION_MODE)    },
     { CHAR2SYM("client_gravity"), (SUB_HOOK_TYPE_CLIENT|SUB_HOOK_ACTION_GRAVITY) },
     { CHAR2SYM("client_focus"),   (SUB_HOOK_TYPE_CLIENT|SUB_HOOK_ACTION_FOCUS)   },
+    { CHAR2SYM("client_rename"),  (SUB_HOOK_TYPE_CLIENT|SUB_HOOK_ACTION_RENAME)  },
     { CHAR2SYM("client_kill"),    (SUB_HOOK_TYPE_CLIENT|SUB_HOOK_ACTION_KILL)    },
     { CHAR2SYM("tag_create"),     (SUB_HOOK_TYPE_TAG|SUB_HOOK_ACTION_CREATE)     },
     { CHAR2SYM("tag_kill"),       (SUB_HOOK_TYPE_TAG|SUB_HOOK_ACTION_KILL)       },
--- a/src/subtle/subtle.h	Wed Jun 19 15:12:38 2013 +0200
+++ b/src/subtle/subtle.h	Fri Dec 15 13:49:12 2017 +0100
@@ -213,7 +213,8 @@
 #define SUB_HOOK_ACTION_MODE          (1L << 18)                  ///< Mode action
 #define SUB_HOOK_ACTION_GRAVITY       (1L << 19)                  ///< Gravity action
 #define SUB_HOOK_ACTION_FOCUS         (1L << 20)                  ///< Focus action
-#define SUB_HOOK_ACTION_KILL          (1L << 21)                  ///< Kill action
+#define SUB_HOOK_ACTION_RENAME        (1L << 21)                  ///< Rename action
+#define SUB_HOOK_ACTION_KILL          (1L << 22)                  ///< Kill action
 
 /* Client flags */
 #define SUB_CLIENT_DEAD               (1L << 10)                  ///< Dead window