davidedmundson added inline comments.

INLINE COMMENTS

> drm_output.cpp:214
>      setDpms(DpmsMode::On);
>      if (!m_waylandOutput.isNull()) {
>          delete m_waylandOutput.data();

This method is coded so that init() can be called twice.

Either:

- that's pointless, and this should just be an assert that m_waylandOutput is 
null.
- we need to make sure we don't do a double connect

(either through disconnecting or just putting the 
m_waylandOutput->setCurrentMode() call in ::updateMode

> drm_output.cpp:221
> +        [this] {
> +            m_waylandOutput->setCurrentMode(QSize(m_mode.hdisplay, 
> m_mode.vdisplay), refreshRateForMode(&m_mode));
> +        }

Every other setFooBar guards m_waylandOutput.

It seems currently superfuous, but as soon as we code up enabledChanged to work 
it'll be needed.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D8578

To: graesslin, #kwin, #plasma
Cc: davidedmundson, plasma-devel, kwin, bwowk, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart

Reply via email to