This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository terminology.

View the commit online.

commit 915e60c0184495c56b5de38b5d35ec14031ebade
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Thu Aug 28 08:46:48 2025 +0100

    escapes - edje - stop listening to chid block/element
    
    new escape/feature - stops listening to signals/messages on given chid
    named block/item
    
    @feat
    fixes  #24
---
 README.md         |  5 +++++
 src/bin/termio.c  | 17 ++++++++++++++++-
 src/bin/termpty.h |  2 ++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index d8d10a36..e198f50e 100644
--- a/README.md
+++ b/README.md
@@ -319,6 +319,11 @@ Examples:
   * `ie`
     end media replace sequence run
 
+  * `ix[chid]`
+    stops the given image/edje block with channel id "chid" from
+    listening to signals and messages. do this when you are done with
+    interacting with the chid identified element.
+
   * `fr[PATH/FILE]`
     begin file send for a file named `PATH` / `FILE`
 
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 5202adc4..33c908c2 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -2386,7 +2386,7 @@ _block_edje_cmds(Termpty *ty, Termblock *blk, Eina_List *cmds, Eina_Bool created
                   blk->chid = eina_stringshare_add(chid);
                   termpty_block_chid_update(ty, blk);
                }
-             if (created)
+             if ((created) && (!blk->no_listen))
                {
                   edje_object_signal_callback_add(blk->obj, "*", "*",
                                                   _block_edje_signal_cb,
@@ -3969,6 +3969,21 @@ _smart_pty_command(void *data)
           {
              ty->block.on = EINA_FALSE;
           }
+        else if (ty->cur_cmd[1] == 'x')
+          {
+             const char *chid = &(ty->cur_cmd[2]);
+             Termblock *blk = termpty_block_chid_get(ty, chid);
+
+             if (blk->edje)
+               {
+                  blk->no_listen = EINA_TRUE;
+                  edje_object_signal_callback_del(blk->obj, "*", "*",
+                                                  _block_edje_signal_cb);
+                  edje_object_message_handler_set(blk->obj,
+                                                  NULL,
+                                                  NULL);
+               }
+          }
      }
    else if (ty->cur_cmd[0] == 'f') // file...
      {
diff --git a/src/bin/termpty.h b/src/bin/termpty.h
index 28530084..d802a0e3 100644
--- a/src/bin/termpty.h
+++ b/src/bin/termpty.h
@@ -267,6 +267,8 @@ struct tag_Termblock
    unsigned char thumb : 1;
    unsigned char edje : 1;
 
+   unsigned char no_listen : 1;
+
    unsigned char active : 1;
    unsigned char was_active : 1;
    unsigned char was_active_before : 1;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to