]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/server.c: filter out xwayland shell for usual clients
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 25 Feb 2024 23:54:57 +0000 (00:54 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 4 Mar 2024 21:35:40 +0000 (21:35 +0000)
protocols/meson.build
src/server.c

index 0ec9154b27f580ff85da435931dd18481dbe29ce..acaf02152e180fec3aa2558249a73356220d99e3 100644 (file)
@@ -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',
index c0ee76827e3f65b7a443a24ac9a69360b6d68767..e1e48dd6cd62ff2160565b769a897078cdb7a9b2 100644 (file)
@@ -17,6 +17,7 @@
 #include <wlr/types/wlr_viewporter.h>
 #if HAVE_XWAYLAND
 #include <wlr/xwayland.h>
+#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