xwayland: Add API to send signal to the Xwayland process
Will be used for test cases to fake-crash the Xwayland process. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
This commit is contained in:
parent
bdb34401c5
commit
c9e7cf4ea1
@ -1276,3 +1276,19 @@ meta_xwayland_handle_xevent (XEvent *event)
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_xwayland_signal (MetaXWaylandManager *manager,
|
||||||
|
int signum,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
if (!manager->proc)
|
||||||
|
{
|
||||||
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
|
"Can't send signal, Xwayland not running");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_subprocess_send_signal (manager->proc, signum);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
@ -50,4 +50,9 @@ void
|
|||||||
meta_xwayland_associate_window_with_surface (MetaWindow *window,
|
meta_xwayland_associate_window_with_surface (MetaWindow *window,
|
||||||
MetaWaylandSurface *surface);
|
MetaWaylandSurface *surface);
|
||||||
|
|
||||||
|
META_EXPORT_TEST
|
||||||
|
gboolean meta_xwayland_signal (MetaXWaylandManager *manager,
|
||||||
|
int signum,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
#endif /* META_XWAYLAND_H */
|
#endif /* META_XWAYLAND_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user