xwayland: Allow setting up maintenance processes

This is made a signal, so the upper layers (read: gnome-shell) may
decide what to spawn, whether to add a GSetting, and whatnot. The
only signal argument contains the appropriate display to use for
this kind of setup.
This commit is contained in:
Carlos Garnacho 2019-07-20 00:22:13 +02:00
parent 252fd771b1
commit 8aeec308fb
2 changed files with 11 additions and 0 deletions

View File

@ -150,6 +150,7 @@ enum
SHOWING_DESKTOP_CHANGED,
RESTACKED,
WORKAREAS_CHANGED,
INIT_XSERVER,
LAST_SIGNAL
};
@ -480,6 +481,13 @@ meta_display_class_init (MetaDisplayClass *klass)
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
display_signals[INIT_XSERVER] =
g_signal_new ("init-xserver",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_INT);
g_object_class_install_property (object_class,
PROP_FOCUS_WINDOW,
g_param_spec_object ("focus-window",

View File

@ -590,6 +590,9 @@ on_displayfd_ready (int fd,
* that means it's ready. */
xserver_finished_init (manager);
g_signal_emit_by_name (display, "init-xserver",
manager->private_connection.display_index);
if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_ON_DEMAND)
meta_display_init_x11 (display, NULL);