Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_backend.cpp
Show All 33 Lines | |||||
34 | #if HAVE_GBM | 34 | #if HAVE_GBM | ||
35 | #include "egl_gbm_backend.h" | 35 | #include "egl_gbm_backend.h" | ||
36 | #include <gbm.h> | 36 | #include <gbm.h> | ||
37 | #endif | 37 | #endif | ||
38 | #if HAVE_EGL_STREAMS | 38 | #if HAVE_EGL_STREAMS | ||
39 | #include "egl_stream_backend.h" | 39 | #include "egl_stream_backend.h" | ||
40 | #endif | 40 | #endif | ||
41 | // KWayland | 41 | // KWayland | ||
42 | #include <KWayland/Server/seat_interface.h> | 42 | #include <KWaylandServer/seat_interface.h> | ||
43 | // KF5 | 43 | // KF5 | ||
44 | #include <KConfigGroup> | 44 | #include <KConfigGroup> | ||
45 | #include <KCoreAddons> | 45 | #include <KCoreAddons> | ||
46 | #include <KLocalizedString> | 46 | #include <KLocalizedString> | ||
47 | #include <KSharedConfig> | 47 | #include <KSharedConfig> | ||
48 | // Qt | 48 | // Qt | ||
49 | #include <QCryptographicHash> | 49 | #include <QCryptographicHash> | ||
50 | #include <QSocketNotifier> | 50 | #include <QSocketNotifier> | ||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 146 | { | |||
151 | m_dpmsFilter.reset(new DpmsInputEventFilter(this)); | 151 | m_dpmsFilter.reset(new DpmsInputEventFilter(this)); | ||
152 | input()->prependInputEventFilter(m_dpmsFilter.data()); | 152 | input()->prependInputEventFilter(m_dpmsFilter.data()); | ||
153 | } | 153 | } | ||
154 | 154 | | |||
155 | void DrmBackend::turnOutputsOn() | 155 | void DrmBackend::turnOutputsOn() | ||
156 | { | 156 | { | ||
157 | m_dpmsFilter.reset(); | 157 | m_dpmsFilter.reset(); | ||
158 | for (auto it = m_enabledOutputs.constBegin(), end = m_enabledOutputs.constEnd(); it != end; it++) { | 158 | for (auto it = m_enabledOutputs.constBegin(), end = m_enabledOutputs.constEnd(); it != end; it++) { | ||
159 | (*it)->updateDpms(KWayland::Server::OutputInterface::DpmsMode::On); | 159 | (*it)->updateDpms(KWaylandServer::OutputInterface::DpmsMode::On); | ||
160 | } | 160 | } | ||
161 | } | 161 | } | ||
162 | 162 | | |||
163 | void DrmBackend::checkOutputsAreOn() | 163 | void DrmBackend::checkOutputsAreOn() | ||
164 | { | 164 | { | ||
165 | if (m_dpmsFilter.isNull()) { | 165 | if (m_dpmsFilter.isNull()) { | ||
166 | // already disabled, all outputs are on | 166 | // already disabled, all outputs are on | ||
167 | return; | 167 | return; | ||
▲ Show 20 Lines • Show All 461 Lines • ▼ Show 20 Line(s) | 628 | #if HAVE_EGL_STREAMS | |||
629 | // Hardware cursors aren't currently supported with EGLStream backend, | 629 | // Hardware cursors aren't currently supported with EGLStream backend, | ||
630 | // possibly an NVIDIA driver bug | 630 | // possibly an NVIDIA driver bug | ||
631 | if (m_useEglStreams) { | 631 | if (m_useEglStreams) { | ||
632 | setSoftWareCursor(true); | 632 | setSoftWareCursor(true); | ||
633 | } | 633 | } | ||
634 | #endif | 634 | #endif | ||
635 | 635 | | |||
636 | m_cursorEnabled = waylandServer()->seat()->hasPointer(); | 636 | m_cursorEnabled = waylandServer()->seat()->hasPointer(); | ||
637 | connect(waylandServer()->seat(), &KWayland::Server::SeatInterface::hasPointerChanged, this, | 637 | connect(waylandServer()->seat(), &KWaylandServer::SeatInterface::hasPointerChanged, this, | ||
638 | [this] { | 638 | [this] { | ||
639 | m_cursorEnabled = waylandServer()->seat()->hasPointer(); | 639 | m_cursorEnabled = waylandServer()->seat()->hasPointer(); | ||
640 | if (usesSoftwareCursor()) { | 640 | if (usesSoftwareCursor()) { | ||
641 | return; | 641 | return; | ||
642 | } | 642 | } | ||
643 | for (auto it = m_outputs.constBegin(); it != m_outputs.constEnd(); ++it) { | 643 | for (auto it = m_outputs.constBegin(); it != m_outputs.constEnd(); ++it) { | ||
644 | if (m_cursorEnabled) { | 644 | if (m_cursorEnabled) { | ||
645 | if (!(*it)->showCursor()) { | 645 | if (!(*it)->showCursor()) { | ||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |