diff --git a/plugins/platforms/drm/drm_object_plane.cpp b/plugins/platforms/drm/drm_object_plane.cpp
index 1dd7a7e243..6ff9ff67a3 100644
--- a/plugins/platforms/drm/drm_object_plane.cpp
+++ b/plugins/platforms/drm/drm_object_plane.cpp
@@ -112,21 +112,19 @@ bool DrmPlane::initProps()
initProp(j, properties.data(), rotationNames);
m_supportedTransformations = Transformations();
- auto checkSupport = [j, this] (uint64_t value, Transformation t, const QString &name) {
+ auto checkSupport = [j, this] (uint64_t value, Transformation t) {
if (propHasEnum(j, value)) {
- qCDebug(KWIN_DRM) << name;
m_supportedTransformations |= t;
}
};
- qCDebug(KWIN_DRM).nospace() << "Supported Transformations on plane " << m_id << ":";
- checkSupport(0, Transformation::Rotate0, "rotate-0");
- checkSupport(1, Transformation::Rotate90, "rotate-90");
- checkSupport(2, Transformation::Rotate180, "rotate-180");
- checkSupport(3, Transformation::Rotate270, "rotate-270");
- checkSupport(4, Transformation::ReflectX, "reflect-x");
- checkSupport(5, Transformation::ReflectY, "reflect-y");
- qCDebug(KWIN_DRM) << "";
+ checkSupport(0, Transformation::Rotate0);
+ checkSupport(1, Transformation::Rotate90);
+ checkSupport(2, Transformation::Rotate180);
+ checkSupport(3, Transformation::Rotate270);
+ checkSupport(4, Transformation::ReflectX);
+ checkSupport(5, Transformation::ReflectY);
+ qCDebug(KWIN_DRM) << "Supported Transformations on plane" << m_id << "are" << m_supportedTransformations;
} else {
initProp(j, properties.data());
}
diff --git a/plugins/platforms/drm/drm_object_plane.h b/plugins/platforms/drm/drm_object_plane.h
index b0ad9f732e..48eb5a6899 100644
--- a/plugins/platforms/drm/drm_object_plane.h
+++ b/plugins/platforms/drm/drm_object_plane.h
@@ -21,6 +21,7 @@ along with this program. If not, see .
#include "drm_object.h"
+#include
#include
namespace KWin
@@ -30,6 +31,7 @@ class DrmBuffer;
class DrmPlane : public DrmObject
{
+ Q_GADGET
public:
DrmPlane(uint32_t plane_id, int fd);
@@ -50,6 +52,7 @@ public:
Rotation,
Count
};
+ Q_ENUM(PropertyIndex)
enum class TypeIndex {
Overlay = 0,
@@ -57,6 +60,7 @@ public:
Cursor,
Count
};
+ Q_ENUM(TypeIndex)
enum class Transformation {
Rotate0 = 1 << 0,
@@ -66,6 +70,7 @@ public:
ReflectX = 1 << 4,
ReflectY = 1 << 5
};
+ Q_ENUM(Transformation)
Q_DECLARE_FLAGS(Transformations, Transformation);
bool atomicInit() override;