xwayland: Pass the manager object to XSetIOErrorExitHandler
This means we can avoid going through global singletons in the handler. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1796>
This commit is contained in:
parent
90ad8b88d4
commit
69f9b36643
@ -635,8 +635,7 @@ static void
|
|||||||
x_io_error_exit (Display *display,
|
x_io_error_exit (Display *display,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
|
MetaXWaylandManager *manager = data;
|
||||||
MetaXWaylandManager *manager = &compositor->xwayland_manager;
|
|
||||||
|
|
||||||
g_warning ("Xwayland just died, attempting to recover");
|
g_warning ("Xwayland just died, attempting to recover");
|
||||||
manager->xserver_grace_period_id =
|
manager->xserver_grace_period_id =
|
||||||
@ -1271,7 +1270,7 @@ meta_xwayland_complete_init (MetaDisplay *display,
|
|||||||
*/
|
*/
|
||||||
XSetIOErrorHandler (x_io_error);
|
XSetIOErrorHandler (x_io_error);
|
||||||
#ifdef HAVE_XSETIOERROREXITHANDLER
|
#ifdef HAVE_XSETIOERROREXITHANDLER
|
||||||
XSetIOErrorExitHandler (xdisplay, x_io_error_exit, display);
|
XSetIOErrorExitHandler (xdisplay, x_io_error_exit, manager);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_signal_connect (display, "x11-display-closing",
|
g_signal_connect (display, "x11-display-closing",
|
||||||
|
Loading…
Reference in New Issue
Block a user