Are events and signals processed in some queued first in first out way?

Thinking about my scrollbar issue, I thought that it would be wise to learn some more about time sequence of emitted signals and events. So I did some google search yesterday, but was not able to find a starting point.

Of course some signals and events may not have a defined order of execution, for example when a window is resized and all widgets grow “in parallel”. But for example for the case where a configure-event is processed, and in that callback function a new signal is emitted, (for example because an adjustment is modified, and that adjustment emits a changed signal) I would assume a FIFO order. Meaning that first all waiting events are processed, before the newly generated event/signal is processed. But maybe my expectations are fully wrong, some events/signals may have higher priority.

Signals are handled synchronously, so they’re sent whenever g_signal_emit is called, not queued for later.

In GtkD, this is what I’ve found:

All signals fire in the order they’re hooked up except that callbacks with Boolean return values are processed before those with void callbacks.

I don’t know if this is the case elsewhere, but it may give you a new lead in solving your problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.