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 f6ef7c2dd68adb10ebe58631279e9ba0afd25018
Author: Carsten Haitzler <[email protected]>
AuthorDate: Wed Jun 17 17:09:29 2026 +0100

    fix huge cpu usage when cursor keeps being re-set to the same thing
    
    @fix performance problem
---
 src/bin/termio.c          | 3 +++
 src/bin/termiointernals.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index 77bca231..d5350e22 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -639,6 +639,7 @@ termio_set_cursor_shape(Evas_Object *obj, Cursor_Shape shape)
 
    EINA_SAFETY_ON_NULL_RETURN(sd);
 
+   if ((sd->cursor.shape == shape) && (!sd->cursor.force)) return;
    config = sd->config;
    theme_apply(sd->cursor.obj, config, _cursor_shape_to_group_name(shape),
                NULL, NULL, EINA_FALSE);
@@ -646,6 +647,7 @@ termio_set_cursor_shape(Evas_Object *obj, Cursor_Shape shape)
    evas_object_resize(sd->cursor.obj, sd->font.chw, sd->font.chh);
    evas_object_show(sd->cursor.obj);
    sd->cursor.shape = shape;
+   sd->cursor.force = EINA_FALSE;
 
    if (term_is_focused(sd->term))
      {
@@ -3498,6 +3500,7 @@ _smart_add(Evas_Object *obj)
                                   _smart_cb_mouse_wheel, obj);
 
    sd->link.suspend = 1;
+   sd->cursor.force = EINA_TRUE;
 
    terms = eina_list_append(terms, obj);
 }
diff --git a/src/bin/termiointernals.h b/src/bin/termiointernals.h
index d4a3fc21..6c8d3c9d 100644
--- a/src/bin/termiointernals.h
+++ b/src/bin/termiointernals.h
@@ -26,6 +26,7 @@ struct tag_Termio
       Evas_Object *obj;
       int x, y;
       Cursor_Shape shape;
+      Eina_Bool force : 1;
    } cursor;
    struct {
       int cx, cy;

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

Reply via email to