#1151 closed todo (done)

dispatch UI start-up actions

Reported by: Ichthyostega Owned by: Ichthyostega
Priority: normal Milestone: 0integration
Component: lumieraGui Keywords: gui session architecture integration
Sub Tickets: Parent Tickets: #1150

Description

The setup of the UI-Layer can be dissected into two distinct phases

  • wiring and instantiation of all participating global services
  • activation of the UI event loop

This creates the generic problem that all actual start-up tasks, which really need an operative UI, somehow need to be scheduled and dispateched from phase-1 into phase-2. The task for this ticket is to build and install a facility to achieve this. Preferrably this facility should live within the UiManager, for reasons of thematic relatedness

Change history (3)

comment:1 by Ichthyostega, at 2018-08-03T15:47:16Z

After a lot of code-reading it became clear that GTK is not of much help here

  • we decided to use GTK-the-Toolkit
  • we do not want to buy into GTK-the-Framework
  • consequently, Lumiera is not based on a Gio::Application
  • but rather we call the small number of really relevant GTK startup-functions ourselves

Thus, basically Glib::Dispatcher can be ruled out, because it requires an alleady running event-Loop,
and since we don't have an Gio::Application, we also don't have a signal_activation() -- the latter being the mechanism
used by Gtk internally to show the GTK Application Window (which we don't need, we just use several Gtk::Window widgets)

Last edited at 2018-08-04T14:06:11Z by Ichthyostega (previous) (diff)

comment:2 by Ichthyostega, at 2018-08-04T14:05:33Z

Resolution: → done
Status: new → closed

In the end, I decided against building a generic service here, since it pretty much looks like a one-time problem.
Preferrably UI content will be pushed or pulled on demand, rather than actively coding content from within the UI-Layer.

The solution is to attach to Glib::signal_timeout() from the ctor of the InteractionDirector.
This signal offers a connect_once() operation, and is implemented by attaching a event source (closure) to the
g_main_context_default() -- which is even created on demand. Thus we're able to place something really
into the event loop, even before gtk_main() has been invoked.

comment:3 by Undercover Agent, at 2025-12-25T00:00:00Z

blocking: 1150
Parent Tickets: → 1150

Migration MasterTickets ⟼ Subtickets-plugin

Note: See TracTickets for help on using tickets.