From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Sun, 25 Feb 2024 23:54:57 +0000 (+0100) Subject: src/server.c: filter out xwayland shell for usual clients X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=7e60c57b8181960c006f03d4c2ce48250ed71b78;p=proto%2Flabwc.git src/server.c: filter out xwayland shell for usual clients --- diff --git a/protocols/meson.build b/protocols/meson.build index 0ec9154b..acaf0215 100644 --- a/protocols/meson.build +++ b/protocols/meson.build @@ -18,6 +18,7 @@ server_protocols = [ wl_protocol_dir / 'unstable/pointer-constraints/pointer-constraints-unstable-v1.xml', wl_protocol_dir / 'staging/cursor-shape/cursor-shape-v1.xml', wl_protocol_dir / 'staging/drm-lease/drm-lease-v1.xml', + wl_protocol_dir / 'staging/xwayland-shell/xwayland-shell-v1.xml', wl_protocol_dir / 'staging/tearing-control/tearing-control-v1.xml', 'wlr-layer-shell-unstable-v1.xml', 'wlr-input-inhibitor-unstable-v1.xml', diff --git a/src/server.c b/src/server.c index c0ee7682..e1e48dd6 100644 --- a/src/server.c +++ b/src/server.c @@ -17,6 +17,7 @@ #include #if HAVE_XWAYLAND #include +#include "xwayland-shell-v1-protocol.h" #endif #include "drm-lease-v1-protocol.h" #include "config/rcxml.h" @@ -172,9 +173,11 @@ server_global_filter(const struct wl_client *client, const struct wl_global *glo (void)iface; (void)server; #if HAVE_XWAYLAND - struct wl_client *xwayland_client = - server->xwayland ? server->xwayland->server->client : NULL; - if (xwayland_client && client == xwayland_client) { + struct wl_client *xwayland_client = (server->xwayland && server->xwayland->server) + ? server->xwayland->server->client + : NULL; + + if (client == xwayland_client) { /* * Filter out wp_drm_lease_device_v1 for now as it is resulting in * issues with Xwayland applications lagging over time. @@ -184,6 +187,9 @@ server_global_filter(const struct wl_client *client, const struct wl_global *glo if (!strcmp(iface->name, wp_drm_lease_device_v1_interface.name)) { return false; } + } else if (!strcmp(iface->name, xwayland_shell_v1_interface.name)) { + /* Filter out the xwayland shell for usual clients */ + return false; } #endif