[mutter/gnome-42] xwayland: Add API to send signal to the Xwayland process
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-42] xwayland: Add API to send signal to the Xwayland process
- Date: Thu, 2 Jun 2022 08:46:30 +0000 (UTC)
commit 573eae6ebc85b4f69cff215608b9a16f6a1592f6
Author: Jonas Ådahl <jadahl gmail com>
Date: Tue Apr 5 23:46:42 2022 +0200
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>
src/wayland/meta-xwayland.c | 16 ++++++++++++++++
src/wayland/meta-xwayland.h | 5 +++++
2 files changed, 21 insertions(+)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 4bf45f3dc3..9b61ce569c 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -1276,3 +1276,19 @@ meta_xwayland_handle_xevent (XEvent *event)
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;
+}
diff --git a/src/wayland/meta-xwayland.h b/src/wayland/meta-xwayland.h
index dac9c689f0..cbe27b1837 100644
--- a/src/wayland/meta-xwayland.h
+++ b/src/wayland/meta-xwayland.h
@@ -50,4 +50,9 @@ void
meta_xwayland_associate_window_with_surface (MetaWindow *window,
MetaWaylandSurface *surface);
+META_EXPORT_TEST
+gboolean meta_xwayland_signal (MetaXWaylandManager *manager,
+ int signum,
+ GError **error);
+
#endif /* META_XWAYLAND_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]