[mutter] xwayland: Only warn on X IO errors when X11 is mandatory
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] xwayland: Only warn on X IO errors when X11 is mandatory
- Date: Tue, 31 May 2022 12:29:03 +0000 (UTC)
commit bdb34401c5dcccade702d2e1cb5e08a373bcabc6
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Apr 5 23:45:51 2022 +0200
xwayland: Only warn on X IO errors when X11 is mandatory
This avoids warnings when we're just slightly unlucky when Xwayland went
away due to inactivity.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
src/wayland/meta-wayland-private.h | 2 ++
src/wayland/meta-xwayland.c | 12 +++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-private.h b/src/wayland/meta-wayland-private.h
index 12e9b40a40..dc4dba4b43 100644
--- a/src/wayland/meta-wayland-private.h
+++ b/src/wayland/meta-wayland-private.h
@@ -54,6 +54,8 @@ typedef struct
struct _MetaXWaylandManager
{
+ MetaWaylandCompositor *compositor;
+
MetaXWaylandConnection private_connection;
MetaXWaylandConnection public_connection;
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index dc96b606fd..4bf45f3dc3 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -478,7 +478,16 @@ static void
x_io_error_exit (Display *display,
void *data)
{
- g_warning ("Xwayland just died, attempting to recover");
+ MetaXWaylandManager *manager = data;
+ MetaX11DisplayPolicy x11_display_policy;
+
+ x11_display_policy =
+ meta_context_get_x11_display_policy (manager->compositor->context);
+
+ if (x11_display_policy == META_X11_DISPLAY_POLICY_MANDATORY)
+ g_warning ("X Wayland crashed (X IO error)");
+ else
+ meta_topic (META_DEBUG_WAYLAND, "Xwayland disappeared");
}
static void
@@ -1033,6 +1042,7 @@ meta_xwayland_init (MetaXWaylandManager *manager,
manager->public_connection.name,
manager->private_connection.name);
+ manager->compositor = compositor;
manager->wayland_display = wl_display;
policy = meta_context_get_x11_display_policy (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]