diff --git a/drm_backend.cpp b/drm_backend.cpp
index b6f6c6f0d1..5aadb2688e 100644
--- a/drm_backend.cpp
+++ b/drm_backend.cpp
@@ -26,9 +26,13 @@ along with this program. If not, see .
#include "udev.h"
#include "utils.h"
#include "virtual_terminal.h"
+#include "wayland_server.h"
#if HAVE_GBM
#include "egl_gbm_backend.h"
#endif
+// KWayland
+#include
+#include
// Qt
#include
#include
@@ -61,6 +65,7 @@ DrmBackend::DrmBackend(QObject *parent)
, m_udev(new Udev)
, m_udevMonitor(m_udev->monitor())
{
+ handleOutputs();
m_cursor[0] = nullptr;
m_cursor[1] = nullptr;
}
@@ -596,6 +601,10 @@ void DrmOutput::init()
{
m_savedCrtc.reset(drmModeGetCrtc(m_backend->fd(), m_crtcId));
blank();
+ m_waylandOutput.reset(waylandServer()->display()->createOutput());
+ m_waylandOutput->setPhysicalSize(size() / 3.8);
+ m_waylandOutput->addMode(size());
+ m_waylandOutput->create();
}
void DrmOutput::blank()
diff --git a/drm_backend.h b/drm_backend.h
index 2da5268274..e8bddb7560 100644
--- a/drm_backend.h
+++ b/drm_backend.h
@@ -28,6 +28,14 @@ along with this program. If not, see .
struct gbm_bo;
struct gbm_surface;
+namespace KWayland
+{
+namespace Server
+{
+class OutputInterface;
+}
+}
+
namespace KWin
{
@@ -135,6 +143,7 @@ private:
}
};
QScopedPointer<_drmModeCrtc, CrtcCleanup> m_savedCrtc;
+ QScopedPointer m_waylandOutput;
};
class DrmBuffer