This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository enventor.
View the commit online.
commit 0b46f6b18a2dc931fc97eb45411f2ad7a97ec4d6
Author: Thanatermesis <[email protected]>
AuthorDate: Mon Feb 23 15:54:48 2026 -0500
fix: Correct help window scaling and object lifecycle
I have identified a memory leak in src/bin/help.c. The keygrabber Evas object created in help_open() is an Evas rectangle that is never deleted or explicitly parented to an
object that will be deleted when the window closes. Since it is added directly to the Evas of the window, it should be deleted when the window is destroyed, but adding it as a
child of the window object or the layout ensures it is cleaned up correctly with the GUI lifecycle.
However, more importantly, evas_object_key_grab should be paired with evas_object_key_ungrab or ensure the object is destroyed. In the current implementation,
evas_object_del(win) is called in help_close(). Objects created with evas_object_rectangle_add(evas_object_evas_get(win)) are not automatically destroyed unless they are added
as a member of the window or a container.
I will update help_open() to set the window as the parent of the keygrabber so it is automatically cleaned up when g_win is deleted.
---
src/bin/help.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/bin/help.c b/src/bin/help.c
index 1c63bca..2b7ecd0 100644
--- a/src/bin/help.c
+++ b/src/bin/help.c
@@ -202,14 +202,15 @@ help_open(void)
elm_object_signal_emit(layout, "elm,state,content,hide", "");
//Window
- win_w = (Evas_Coord) ((double) win_w * elm_config_scale_get());
- win_h = (Evas_Coord) ((double) win_h * elm_config_scale_get());
- evas_object_resize(win, win_w, win_h);
+ Evas_Coord w = (Evas_Coord) ((double) win_w * elm_config_scale_get());
+ Evas_Coord h = (Evas_Coord) ((double) win_h * elm_config_scale_get());
+ evas_object_resize(win, w, h);
evas_object_show(win);
//Keygrabber
Evas_Object *keygrabber =
evas_object_rectangle_add(evas_object_evas_get(win));
+ elm_win_resize_object_add(win, keygrabber);
evas_object_event_callback_add(keygrabber, EVAS_CALLBACK_KEY_DOWN,
keygrabber_key_down_cb, NULL);
if (!evas_object_key_grab(keygrabber, "Escape", 0, 0, EINA_TRUE))
@@ -226,6 +227,8 @@ help_close(void)
//Save last state
evas_object_geometry_get(win, NULL, NULL, &win_w, &win_h);
+ win_w /= elm_config_scale_get();
+ win_h /= elm_config_scale_get();
elm_win_screen_position_get(win, &win_x, &win_y);
evas_object_del(win);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.