wayland: Terminate Xwayland when shutting down
This is less confusing to Xwayland than suddenly loosing the Wayland socket connection. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1822>
This commit is contained in:
parent
799c6dcf2f
commit
c614cc3e82
@ -574,6 +574,16 @@ xserver_died (GObject *source,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_xwayland_terminate (MetaXWaylandManager *manager)
|
||||||
|
{
|
||||||
|
MetaDisplay *display = meta_get_display ();
|
||||||
|
|
||||||
|
g_clear_handle_id (&manager->xserver_grace_period_id, g_source_remove);
|
||||||
|
meta_display_shutdown_x11 (display);
|
||||||
|
meta_xwayland_stop_xserver (manager);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
shutdown_xwayland_cb (gpointer data)
|
shutdown_xwayland_cb (gpointer data)
|
||||||
{
|
{
|
||||||
@ -591,8 +601,7 @@ shutdown_xwayland_cb (gpointer data)
|
|||||||
|
|
||||||
meta_verbose ("Shutting down Xwayland");
|
meta_verbose ("Shutting down Xwayland");
|
||||||
manager->xserver_grace_period_id = 0;
|
manager->xserver_grace_period_id = 0;
|
||||||
meta_display_shutdown_x11 (display);
|
meta_xwayland_terminate (manager);
|
||||||
meta_xwayland_stop_xserver (manager);
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1289,7 +1298,7 @@ meta_xwayland_shutdown (MetaXWaylandManager *manager)
|
|||||||
x_io_error_exit_noop, NULL);
|
x_io_error_exit_noop, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
meta_display_shutdown_x11 (meta_get_display ());
|
meta_xwayland_terminate (manager);
|
||||||
|
|
||||||
snprintf (path, sizeof path, "%s%d", X11_TMP_UNIX_PATH,
|
snprintf (path, sizeof path, "%s%d", X11_TMP_UNIX_PATH,
|
||||||
manager->public_connection.display_index);
|
manager->public_connection.display_index);
|
||||||
|
Loading…
Reference in New Issue
Block a user