Skip to content

Instantly share code, notes, and snippets.

@gen2brain
Created January 4, 2026 09:20
Show Gist options
  • Select an option

  • Save gen2brain/8ed03d6eef620cc25007b5d7a5cc5779 to your computer and use it in GitHub Desktop.

Select an option

Save gen2brain/8ed03d6eef620cc25007b5d7a5cc5779 to your computer and use it in GitHub Desktop.
diff '--color=auto' -ur efl-1.28.1.orig/src/lib/ecore/efl_loop.c efl-1.28.1/src/lib/ecore/efl_loop.c
--- efl-1.28.1.orig/src/lib/ecore/efl_loop.c 2025-03-17 16:43:43.000000000 +0100
+++ efl-1.28.1/src/lib/ecore/efl_loop.c 2026-01-04 10:17:11.731477396 +0100
@@ -639,6 +639,24 @@
EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0);
+EOLIAN static void
+_efl_loop_message_pending_flush(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd)
+{
+ Message *msg;
+
+ while (pd->message_pending_queue)
+ {
+ msg = (Message *)pd->message_pending_queue;
+ pd->message_pending_queue = eina_inlist_remove(pd->message_pending_queue,
+ pd->message_pending_queue);
+ if ((msg->handler) && (msg->message) && (!msg->delete_me))
+ pd->message_queue = eina_inlist_append(pd->message_queue,
+ EINA_INLIST_GET(msg));
+ else
+ free(msg);
+ }
+}
+
EWAPI void
efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
const char *flavor, const char *build_id)
diff '--color=auto' -ur efl-1.28.1.orig/src/lib/ecore/efl_loop.eo efl-1.28.1/src/lib/ecore/efl_loop.eo
--- efl-1.28.1.orig/src/lib/ecore/efl_loop.eo 2025-03-17 16:43:43.000000000 +0100
+++ efl-1.28.1/src/lib/ecore/efl_loop.eo 2026-01-04 10:18:29.819863343 +0100
@@ -105,6 +105,20 @@
}
return: future<void> @move; [[The future handle.]]
}
+ message_pending_flush {
+ [[Forces pending messages to be moved to the main message queue.
+
+ When processing messages, new messages are temporarily held in a
+ pending queue. Normally this pending queue is flushed to the main
+ queue only when message processing completes (message_walking == 0).
+
+ This function forces an immediate flush of pending messages to the
+ main queue, which is necessary for implementing nested event loops
+ from within message handlers.
+
+ @since 1.29
+ ]]
+ }
}
events {
idle,enter @restart: void; [[Event occurs once the main loop enters the idle state.]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment