Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/wayland/wayland_backend.cpp
Show First 20 Lines • Show All 343 Lines • ▼ Show 20 Line(s) | 340 | if (server) { | |||
---|---|---|---|---|---|
344 | connect(m_seat, &Seat::hasPointerChanged, si, &SeatInterface::setHasPointer); | 344 | connect(m_seat, &Seat::hasPointerChanged, si, &SeatInterface::setHasPointer); | ||
345 | connect(m_seat, &Seat::hasTouchChanged, si, &SeatInterface::setHasTouch); | 345 | connect(m_seat, &Seat::hasTouchChanged, si, &SeatInterface::setHasTouch); | ||
346 | connect(m_seat, &Seat::nameChanged, si, &SeatInterface::setName); | 346 | connect(m_seat, &Seat::nameChanged, si, &SeatInterface::setName); | ||
347 | } | 347 | } | ||
348 | } | 348 | } | ||
349 | 349 | | |||
350 | void WaylandBackend::pointerMotionRelativeToOutput(const QPointF &position, quint32 time) | 350 | void WaylandBackend::pointerMotionRelativeToOutput(const QPointF &position, quint32 time) | ||
351 | { | 351 | { | ||
352 | auto outputIt = std::find_if(m_outputs.begin(), m_outputs.end(), [this](WaylandOutput *wo) { | 352 | auto outputIt = std::find_if(m_outputs.begin(), m_outputs.end(), [this](WaylandOutput *wo) { | ||
353 | return wo->surface() == m_seat->pointer()->enteredSurface(); | 353 | return wo->surface() == m_seat->pointer()->enteredSurface(); | ||
gladhorn: Here a cast from Output* to WaylandOutput* would be needed. | |||||
354 | }); | 354 | }); | ||
355 | Q_ASSERT(outputIt != m_outputs.end()); | 355 | Q_ASSERT(outputIt != m_outputs.end()); | ||
356 | const QPointF outputPosition = (*outputIt)->geometry().topLeft() + position; | 356 | const QPointF outputPosition = (*outputIt)->geometry().topLeft() + position; | ||
357 | Platform::pointerMotion(outputPosition, time); | 357 | Platform::pointerMotion(outputPosition, time); | ||
358 | } | 358 | } | ||
359 | 359 | | |||
360 | WaylandSeat::~WaylandSeat() | 360 | WaylandSeat::~WaylandSeat() | ||
361 | { | 361 | { | ||
▲ Show 20 Lines • Show All 468 Lines • ▼ Show 20 Line(s) | 827 | { | |||
830 | } | 830 | } | ||
831 | #if HAVE_WAYLAND_EGL | 831 | #if HAVE_WAYLAND_EGL | ||
832 | return QVector<CompositingType>{OpenGLCompositing, QPainterCompositing}; | 832 | return QVector<CompositingType>{OpenGLCompositing, QPainterCompositing}; | ||
833 | #else | 833 | #else | ||
834 | return QVector<CompositingType>{QPainterCompositing}; | 834 | return QVector<CompositingType>{QPainterCompositing}; | ||
835 | #endif | 835 | #endif | ||
836 | } | 836 | } | ||
837 | 837 | | |||
838 | Outputs WaylandBackend::outputs() const | 838 | QVector<AbstractOutput *> WaylandBackend::outputs() const | ||
839 | { | 839 | { | ||
840 | return m_outputs; | 840 | return vector_cast<AbstractOutput *>(m_outputs); | ||
841 | } | 841 | } | ||
842 | 842 | | |||
843 | Outputs WaylandBackend::enabledOutputs() const | 843 | QVector<AbstractOutput *> WaylandBackend::enabledOutputs() const | ||
844 | { | 844 | { | ||
845 | // all outputs are enabled | 845 | // all outputs are enabled | ||
846 | return m_outputs; | 846 | return vector_cast<AbstractOutput *>(m_outputs); | ||
847 | } | 847 | } | ||
848 | 848 | | |||
849 | } | 849 | } | ||
850 | 850 | | |||
851 | } // KWin | 851 | } // KWin |
Here a cast from Output* to WaylandOutput* would be needed.