Drop WaylandOutput
This commit is contained in:
parent
c3f970b3c3
commit
7115ea75a4
5 changed files with 7 additions and 60 deletions
|
@ -150,7 +150,6 @@ target_sources(kwin PRIVATE
|
|||
virtualkeyboard_dbus.cpp
|
||||
was_user_interaction_x11_filter.cpp
|
||||
wayland_server.cpp
|
||||
waylandoutput.cpp
|
||||
waylandshellintegration.cpp
|
||||
waylandwindow.cpp
|
||||
window.cpp
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
#include "wayland/xdgoutput_v1_interface.h"
|
||||
#include "wayland/xdgshell_interface.h"
|
||||
#include "wayland/xwaylandkeyboardgrab_v1_interface.h"
|
||||
#include "waylandoutput.h"
|
||||
#include "workspace.h"
|
||||
#include "x11window.h"
|
||||
#include "xdgactivationv1.h"
|
||||
|
@ -297,14 +296,17 @@ void WaylandServer::handleOutputRemoved(Output *output)
|
|||
void WaylandServer::handleOutputEnabled(Output *output)
|
||||
{
|
||||
if (!output->isPlaceholder() && !output->isNonDesktop()) {
|
||||
m_waylandOutputs.insert(output, new WaylandOutput(output));
|
||||
auto waylandOutput = new KWaylandServer::OutputInterface(waylandServer()->display(), output);
|
||||
m_xdgOutputManagerV1->createXdgOutput(waylandOutput, waylandOutput);
|
||||
|
||||
m_waylandOutputs.insert(output, waylandOutput);
|
||||
}
|
||||
}
|
||||
|
||||
void WaylandServer::handleOutputDisabled(Output *output)
|
||||
{
|
||||
if (!output->isPlaceholder() && !output->isNonDesktop()) {
|
||||
delete m_waylandOutputs.take(output);
|
||||
if (auto waylandOutput = m_waylandOutputs.take(output)) {
|
||||
waylandOutput->remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ class XdgActivationV1Integration;
|
|||
class XdgPopupWindow;
|
||||
class XdgSurfaceWindow;
|
||||
class XdgToplevelWindow;
|
||||
class WaylandOutput;
|
||||
|
||||
class KWIN_EXPORT WaylandServer : public QObject
|
||||
{
|
||||
|
@ -292,7 +291,7 @@ private:
|
|||
KWaylandServer::ContentTypeManagerV1Interface *m_contentTypeManager = nullptr;
|
||||
QList<Window *> m_windows;
|
||||
InitializationFlags m_initFlags;
|
||||
QHash<Output *, WaylandOutput *> m_waylandOutputs;
|
||||
QHash<Output *, KWaylandServer::OutputInterface *> m_waylandOutputs;
|
||||
QHash<Output *, KWaylandServer::OutputDeviceV2Interface *> m_waylandOutputDevices;
|
||||
KWIN_SINGLETON(WaylandServer)
|
||||
};
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "waylandoutput.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
WaylandOutput::WaylandOutput(Output *output, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_platformOutput(output)
|
||||
, m_waylandOutput(new KWaylandServer::OutputInterface(waylandServer()->display(), output))
|
||||
, m_xdgOutputV1(waylandServer()->xdgOutputManagerV1()->createXdgOutput(m_waylandOutput.get(), m_waylandOutput.get()))
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace KWin
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/output.h"
|
||||
#include "wayland/output_interface.h"
|
||||
#include "wayland/utils.h"
|
||||
#include "wayland/xdgoutput_v1_interface.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
class WaylandOutput : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit WaylandOutput(Output *output, QObject *parent = nullptr);
|
||||
|
||||
private:
|
||||
Output *m_platformOutput;
|
||||
KWaylandServer::ScopedGlobalPointer<KWaylandServer::OutputInterface> m_waylandOutput;
|
||||
KWaylandServer::XdgOutputV1Interface *m_xdgOutputV1;
|
||||
};
|
||||
|
||||
} // namespace KWin
|
Loading…
Reference in a new issue