From 5463a5427d23a919b66fcae67092e63048367209 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 13 Jul 2020 14:38:12 +0300 Subject: [PATCH] [wayland] Drop pointless xwayland connection check Xwayland can operate in two modes - rootless and rootful. When Xwayland operates in the rootful mode, a container window is created where all native X11 clients are placed. The container window is an xdg-toplevel surface. Most compositors are not interested in rootful mode. When Xwayland operates in the rootless mode, every X11 window is going to be represented with a Wayland surface that has no role assigned to it. In order to associate a wayland surface with an X11 window, Xwayland will send a client message of type WL_SURFACE_ID. Since we want Xwayland operate only in rootless mode, the check that verifies that a newly created xdg-toplevel surface belongs to Xwayland is pointless. We are never going to hit that case. --- wayland_server.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wayland_server.cpp b/wayland_server.cpp index c582f3a56d..75b086acbc 100644 --- a/wayland_server.cpp +++ b/wayland_server.cpp @@ -156,9 +156,7 @@ void WaylandServer::registerXdgToplevelClient(XdgToplevelClient *client) // TODO: Find a better way and more generic to install extensions. SurfaceInterface *surface = client->surface(); - if (surface->client() == m_xwayland.client) { - return; - } + if (surface->client() == m_screenLockerClientConnection) { ScreenLocker::KSldApp::self()->lockScreenShown(); }