wayland: support removing the fake input interface

If it can be removed, we better react to it.
This commit is contained in:
Aleix Pol 2018-11-07 17:17:38 +01:00
parent 41e13c2e84
commit 4b261508ff
2 changed files with 3 additions and 1 deletions

View file

@ -46,6 +46,7 @@ WaylandRemoteInput::WaylandRemoteInput(QObject* parent)
m_waylandInput = registry->createFakeInput(name, version, this); m_waylandInput = registry->createFakeInput(name, version, this);
} }
); );
connect(registry, &Registry::fakeInputRemoved, m_waylandInput, &QObject::deleteLater);
registry->setup(); registry->setup();
} }

View file

@ -21,6 +21,7 @@
#ifndef WAYLANDREMOTEINPUT_H #ifndef WAYLANDREMOTEINPUT_H
#define WAYLANDREMOTEINPUT_H #define WAYLANDREMOTEINPUT_H
#include <QPointer>
#include "abstractremoteinput.h" #include "abstractremoteinput.h"
namespace KWayland namespace KWayland
@ -44,7 +45,7 @@ public:
private: private:
void setupWaylandIntegration(); void setupWaylandIntegration();
KWayland::Client::FakeInput* m_waylandInput; QPointer<KWayland::Client::FakeInput> m_waylandInput;
bool m_waylandAuthenticationRequested; bool m_waylandAuthenticationRequested;
}; };