drm: Improve QDebug of DrmOutput
Instead of printing as QObject, provide actual information of the instance.
This commit is contained in:
parent
a13ecf8d0e
commit
fa654bda59
2 changed files with 20 additions and 0 deletions
|
@ -1089,3 +1089,10 @@ bool DrmOutput::setGammaRamp(const GammaRamp &gamma)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
QDebug& operator<<(QDebug& s, const KWin::DrmOutput* output)
|
||||
{
|
||||
if (!output)
|
||||
return s.nospace() << "DrmOutput()";
|
||||
return s.nospace() << "DrmOutput(" << output->name() << ", crtc:" << output->crtc() << ", connector:" << output->connector() << ", geometry:" << output->geometry() << ')';
|
||||
}
|
||||
|
|
|
@ -68,14 +68,25 @@ public:
|
|||
Suspend = DRM_MODE_DPMS_SUSPEND,
|
||||
Off = DRM_MODE_DPMS_OFF
|
||||
};
|
||||
Q_ENUM(DpmsMode);
|
||||
bool isDpmsEnabled() const {
|
||||
// We care for current as well as pending mode in order to allow first present in AMS.
|
||||
return m_dpmsModePending == DpmsMode::On;
|
||||
}
|
||||
|
||||
DpmsMode dpmsMode() const {
|
||||
return m_dpmsMode;
|
||||
}
|
||||
DpmsMode dpmsModePending() const {
|
||||
return m_dpmsModePending;
|
||||
}
|
||||
|
||||
const DrmCrtc *crtc() const {
|
||||
return m_crtc;
|
||||
}
|
||||
const DrmConnector *connector() const {
|
||||
return m_conn;
|
||||
}
|
||||
const DrmPlane *primaryPlane() const {
|
||||
return m_primaryPlane;
|
||||
}
|
||||
|
@ -181,5 +192,7 @@ private:
|
|||
|
||||
Q_DECLARE_METATYPE(KWin::DrmOutput*)
|
||||
|
||||
QDebug& operator<<(QDebug& stream, const KWin::DrmOutput *);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue