From 3de377e4616cd752d5ab511de314a9e41ca182d9 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 22 Apr 2022 21:15:17 +0300 Subject: [PATCH] Rename XwaylandClient to XwaylandWindow --- src/CMakeLists.txt | 2 +- src/workspace.cpp | 4 ++-- src/{xwaylandclient.cpp => xwaylandwindow.cpp} | 14 +++++++------- src/{xwaylandclient.h => xwaylandwindow.h} | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) rename src/{xwaylandclient.cpp => xwaylandwindow.cpp} (84%) rename src/{xwaylandclient.h => xwaylandwindow.h} (75%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dfe4653a9f..565a64a99a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -158,7 +158,7 @@ target_sources(kwin PRIVATE xdgshellintegration.cpp xdgshellwindow.cpp xkb.cpp - xwaylandclient.cpp + xwaylandwindow.cpp xwayland/xwayland_interface.cpp ) diff --git a/src/workspace.cpp b/src/workspace.cpp index 6825365492..c50c35c3d2 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -52,7 +52,7 @@ #include "virtualdesktops.h" #include "was_user_interaction_x11_filter.h" #include "wayland_server.h" -#include "xwaylandclient.h" +#include "xwaylandwindow.h" // KDE #include #include @@ -652,7 +652,7 @@ X11Window *Workspace::createClient(xcb_window_t w, bool is_mapped) if (kwinApp()->operationMode() == Application::OperationModeX11) { c = new X11Window(); } else { - c = new XwaylandClient(); + c = new XwaylandWindow(); } setupClientConnections(c); if (X11Compositor *compositor = X11Compositor::self()) { diff --git a/src/xwaylandclient.cpp b/src/xwaylandwindow.cpp similarity index 84% rename from src/xwaylandclient.cpp rename to src/xwaylandwindow.cpp index 586abf70cf..fa160c18ed 100644 --- a/src/xwaylandclient.cpp +++ b/src/xwaylandwindow.cpp @@ -7,7 +7,7 @@ SPDX-License-Identifier: GPL-2.0-or-later */ -#include "xwaylandclient.h" +#include "xwaylandwindow.h" #include "wayland/surface_interface.h" using namespace KWaylandServer; @@ -15,24 +15,24 @@ using namespace KWaylandServer; namespace KWin { -XwaylandClient::XwaylandClient() +XwaylandWindow::XwaylandWindow() { // The wayland surface is associated with the Xwayland window asynchronously. - connect(this, &Window::surfaceChanged, this, &XwaylandClient::associate); + connect(this, &Window::surfaceChanged, this, &XwaylandWindow::associate); } -void XwaylandClient::associate() +void XwaylandWindow::associate() { if (surface()->isMapped()) { initialize(); } else { // Queued connection because we want to mark the window ready for painting after // the associated surface item has processed the new surface state. - connect(surface(), &SurfaceInterface::mapped, this, &XwaylandClient::initialize, Qt::QueuedConnection); + connect(surface(), &SurfaceInterface::mapped, this, &XwaylandWindow::initialize, Qt::QueuedConnection); } } -void XwaylandClient::initialize() +void XwaylandWindow::initialize() { if (!readyForPainting()) { // avoid "setReadyForPainting()" function calling overhead if (syncRequest().counter == XCB_NONE) { // cannot detect complete redraw, consider done now @@ -42,7 +42,7 @@ void XwaylandClient::initialize() } } -bool XwaylandClient::wantsSyncCounter() const +bool XwaylandWindow::wantsSyncCounter() const { // When the frame window is resized, the attached buffer will be destroyed by // Xwayland, causing unexpected invalid previous and current window pixmaps. diff --git a/src/xwaylandclient.h b/src/xwaylandwindow.h similarity index 75% rename from src/xwaylandclient.h rename to src/xwaylandwindow.h index 7d278fec29..bb1929e8b6 100644 --- a/src/xwaylandclient.h +++ b/src/xwaylandwindow.h @@ -15,14 +15,14 @@ namespace KWin { /** - * The XwaylandClient class represents a managed Xwayland client. + * The XwaylandWindow class represents a managed Xwayland window. */ -class XwaylandClient : public X11Window +class XwaylandWindow : public X11Window { Q_OBJECT public: - explicit XwaylandClient(); + explicit XwaylandWindow(); bool wantsSyncCounter() const override;