Changeset View
Changeset View
Standalone View
Standalone View
backends/kwayland/waylandbackend.cpp
Show All 16 Lines | |||||
17 | * License along with this library; if not, write to the Free Software * | 17 | * License along with this library; if not, write to the Free Software * | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * | ||
19 | *************************************************************************************/ | 19 | *************************************************************************************/ | ||
20 | #include "waylandbackend.h" | 20 | #include "waylandbackend.h" | ||
21 | 21 | | |||
22 | #include "waylandconfig.h" | 22 | #include "waylandconfig.h" | ||
23 | #include "waylandoutput.h" | 23 | #include "waylandoutput.h" | ||
24 | 24 | | |||
25 | #include "wayland_logging.h" | ||||
26 | | ||||
25 | #include <configmonitor.h> | 27 | #include <configmonitor.h> | ||
26 | #include <mode.h> | 28 | #include <mode.h> | ||
27 | 29 | | |||
28 | #include <QSettings> | 30 | #include <QSettings> | ||
29 | #include <QStandardPaths> | 31 | #include <QStandardPaths> | ||
30 | 32 | | |||
31 | using namespace KScreen; | 33 | using namespace KScreen; | ||
32 | 34 | | |||
33 | Q_LOGGING_CATEGORY(KSCREEN_WAYLAND, "kscreen.kwayland") | | |||
34 | | ||||
35 | | ||||
36 | WaylandBackend::WaylandBackend() | 35 | WaylandBackend::WaylandBackend() | ||
37 | : KScreen::AbstractBackend() | 36 | : KScreen::AbstractBackend() | ||
38 | , m_internalConfig(new WaylandConfig(this)) | 37 | , m_internalConfig(new WaylandConfig(this)) | ||
39 | { | 38 | { | ||
40 | qCDebug(KSCREEN_WAYLAND) << "Loading Wayland backend."; | 39 | qCDebug(KSCREEN_WAYLAND) << "Loading Wayland backend."; | ||
41 | 40 | | |||
42 | connect(m_internalConfig, &WaylandConfig::configChanged, | 41 | connect(m_internalConfig, &WaylandConfig::configChanged, | ||
43 | this, [this]() { | 42 | this, [this]() { | ||
Show All 26 Lines | |||||
70 | } | 69 | } | ||
71 | 70 | | |||
72 | QByteArray WaylandBackend::edid(int outputId) const | 71 | QByteArray WaylandBackend::edid(int outputId) const | ||
73 | { | 72 | { | ||
74 | WaylandOutput *output = m_internalConfig->outputMap().value(outputId); | 73 | WaylandOutput *output = m_internalConfig->outputMap().value(outputId); | ||
75 | if (!output) { | 74 | if (!output) { | ||
76 | return QByteArray(); | 75 | return QByteArray(); | ||
77 | } | 76 | } | ||
78 | return output->outputDevice()->edid(); | 77 | return output->edid(); | ||
79 | } | 78 | } | ||
80 | 79 | | |||
81 | bool WaylandBackend::isValid() const | 80 | bool WaylandBackend::isValid() const | ||
82 | { | 81 | { | ||
83 | return m_internalConfig->isInitialized(); | 82 | return m_internalConfig->isInitialized(); | ||
84 | } | 83 | } |