Rename XwaylandClient to XwaylandWindow

This commit is contained in:
Vlad Zahorodnii 2022-04-22 21:15:17 +03:00
parent 4b91c6163f
commit 3de377e461
4 changed files with 13 additions and 13 deletions

View file

@ -158,7 +158,7 @@ target_sources(kwin PRIVATE
xdgshellintegration.cpp
xdgshellwindow.cpp
xkb.cpp
xwaylandclient.cpp
xwaylandwindow.cpp
xwayland/xwayland_interface.cpp
)

View file

@ -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 <KConfig>
#include <KConfigGroup>
@ -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()) {

View file

@ -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.

View file

@ -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;