backends/wayland: Decouple from Compositor and Scene

Scene::addRepaintFull() is used to request an output update, but there
are other ways to do it that require referencing neither Compositor nor
Scene.

Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/3202>
This commit is contained in:
Vlad Zahorodnii 2022-11-17 10:47:05 +02:00 committed by Merge Service
parent 3aa635430b
commit b2d78a5c30

View file

@ -18,13 +18,11 @@
#include "wayland_output.h"
#include "wayland_qpainter_backend.h"
#include "composite.h"
#include "cursor.h"
#include "dpmsinputeventfilter.h"
#include "input.h"
#include "keyboard_input.h"
#include "pointer_input.h"
#include "scene.h"
#include <KWayland/Client/buffer.h>
#include <KWayland/Client/compositor.h>
@ -182,7 +180,7 @@ void WaylandSubSurfaceCursor::move(const QPointF &globalPosition)
// place the sub-surface relative to the output it is on and factor in the hotspot
const auto relativePosition = globalPosition.toPoint() - Cursors::self()->currentCursor()->hotspot() - m_output->geometry().topLeft();
m_subSurface->setPosition(relativePosition);
Compositor::self()->scene()->addRepaintFull();
m_output->renderLoop()->scheduleRepaint();
}
WaylandInputDevice::WaylandInputDevice(KWayland::Client::Keyboard *keyboard, WaylandSeat *seat)