[backends/wayland] Do not query outputs

Not needed, we use a nested window.
icc-effect-5.14.5
Martin Gräßlin 2015-11-17 09:34:03 +01:00
parent df71c5b61b
commit 930e56767e
2 changed files with 1 additions and 29 deletions

View File

@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/event_queue.h>
#include <KWayland/Client/keyboard.h>
#include <KWayland/Client/output.h>
#include <KWayland/Client/pointer.h>
#include <KWayland/Client/region.h>
#include <KWayland/Client/registry.h>
@ -279,13 +278,11 @@ WaylandBackend::WaylandBackend(QObject *parent)
, m_connectionThreadObject(new ConnectionThread(nullptr))
, m_connectionThread(nullptr)
{
connect(this, &WaylandBackend::outputsChanged, this, &WaylandBackend::screensQueried);
connect(this, &WaylandBackend::connectionFailed, this, &WaylandBackend::initFailed);
}
WaylandBackend::~WaylandBackend()
{
destroyOutputs();
if (m_shellSurface) {
m_shellSurface->release();
}
@ -318,14 +315,6 @@ void WaylandBackend::init()
m_shell->setup(m_registry->bindShell(name, 1));
}
);
connect(m_registry, &Registry::outputAnnounced, this,
[this](quint32 name) {
Output *output = new Output(this);
output->setup(m_registry->bindOutput(name, 2));
m_outputs.append(output);
connect(output, &Output::changed, this, &WaylandBackend::outputsChanged);
}
);
connect(m_registry, &Registry::seatAnnounced, this,
[this](quint32 name) {
if (Application::usesLibinput()) {
@ -344,12 +333,6 @@ void WaylandBackend::init()
initConnection();
}
void WaylandBackend::destroyOutputs()
{
qDeleteAll(m_outputs);
m_outputs.clear();
}
void WaylandBackend::initConnection()
{
connect(m_connectionThreadObject, &ConnectionThread::connected, this,
@ -369,7 +352,6 @@ void WaylandBackend::initConnection()
emit systemCompositorDied();
m_seat.reset();
m_shm->destroy();
destroyOutputs();
if (m_shellSurface) {
m_shellSurface->destroy();
delete m_shellSurface;
@ -445,6 +427,7 @@ void WaylandBackend::createSurface()
m_shellSurface->setSize(initialWindowSize());
m_shellSurface->setToplevel();
setReady(true);
emit screensQueried();
}
}

View File

@ -46,7 +46,6 @@ class Compositor;
class ConnectionThread;
class EventQueue;
class Keyboard;
class Output;
class Pointer;
class Registry;
class Seat;
@ -113,7 +112,6 @@ public:
void init() override;
wl_display *display();
KWayland::Client::Compositor *compositor();
const QList<KWayland::Client::Output*> &outputs() const;
KWayland::Client::ShmPool *shmPool();
KWayland::Client::Surface *surface() const;
@ -128,12 +126,10 @@ public:
Q_SIGNALS:
void shellSurfaceSizeChanged(const QSize &size);
void systemCompositorDied();
void outputsChanged();
void connectionFailed();
private:
void initConnection();
void createSurface();
void destroyOutputs();
wl_display *m_display;
KWayland::Client::EventQueue *m_eventQueue;
KWayland::Client::Registry *m_registry;
@ -143,7 +139,6 @@ private:
KWayland::Client::ShellSurface *m_shellSurface;
QScopedPointer<WaylandSeat> m_seat;
KWayland::Client::ShmPool *m_shm;
QList<KWayland::Client::Output*> m_outputs;
KWayland::Client::ConnectionThread *m_connectionThreadObject;
QThread *m_connectionThread;
};
@ -172,12 +167,6 @@ KWayland::Client::Surface *WaylandBackend::surface() const
return m_surface;
}
inline
const QList< KWayland::Client::Output* >& WaylandBackend::outputs() const
{
return m_outputs;
}
} // namespace Wayland
} // namespace KWin