wayland: Move relative pointer extension instantiation to WaylandServer

Whether relative pointers are supported doesn't depend on the input
backend. This change moves the instantiation of the extension to the
WaylandServer class to make code more consistent.
This commit is contained in:
Vlad Zahorodnii 2021-10-05 21:37:58 +03:00
parent 3da0725404
commit 4f46da46fc
2 changed files with 2 additions and 8 deletions

View file

@ -43,7 +43,6 @@
#include <KLocalizedString>
#include <KWaylandServer/display.h>
#include <KWaylandServer/fakeinput_interface.h>
#include <KWaylandServer/relativepointer_v1_interface.h>
#include <KWaylandServer/seat_interface.h>
#include <KWaylandServer/shmclientbuffer.h>
#include <KWaylandServer/surface_interface.h>
@ -2393,13 +2392,6 @@ void InputRedirection::setupLibInput()
m_libInput->moveToThread(m_libInputThread);
if (conn) {
if (waylandServer()) {
// create relative pointer manager
new KWaylandServer::RelativePointerManagerV1Interface(waylandServer()->display(),
waylandServer()->display());
}
conn->setInputConfig(InputConfig::self()->inputConfig());
conn->updateLEDs(m_keyboard->xkb()->leds());
waylandServer()->updateKeyState(m_keyboard->xkb()->leds());

View file

@ -63,6 +63,7 @@
#include <KWaylandServer/viewporter_interface.h>
#include <KWaylandServer/datacontroldevicemanager_v1_interface.h>
#include <KWaylandServer/primaryselectiondevicemanager_v1_interface.h>
#include <KWaylandServer/relativepointer_v1_interface.h>
// Qt
#include <QCryptographicHash>
@ -414,6 +415,7 @@ bool WaylandServer::init(InitializationFlags flags)
m_seat = new SeatInterface(m_display, m_display);
new PointerGesturesV1Interface(m_display, m_display);
new PointerConstraintsV1Interface(m_display, m_display);
new RelativePointerManagerV1Interface(m_display, m_display);
m_dataDeviceManager = new DataDeviceManagerInterface(m_display, m_display);
new DataControlDeviceManagerV1Interface(m_display, m_display);
new PrimarySelectionDeviceManagerV1Interface(m_display, m_display);