From: Ivailo Monev Date: Sun, 15 May 2016 03:57:58 +0000 (+0000) Subject: kcontrol: fix build of randr due to recent protocol changes X-Git-Tag: 4.22.0~1474 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b12969dced750b867b99d2fd0971ebea44d8e9d9;p=kde%2Fkde-workspace.git kcontrol: fix build of randr due to recent protocol changes Signed-off-by: Ivailo Monev --- diff --git a/kcontrol/randr/randroutput.cpp b/kcontrol/randr/randroutput.cpp index e334f906..a8b545e3 100644 --- a/kcontrol/randr/randroutput.cpp +++ b/kcontrol/randr/randroutput.cpp @@ -202,12 +202,12 @@ void RandROutput::handleEvent(XRROutputChangeNotifyEvent *event) m_connected = (event->connection == RR_Connected); loadSettings(false); if (!m_connected && currentCrtc != None) - setCrtc(None); + setCrtc(m_screen->crtc(None), true); } // check if we are still connected, if not, release the crtc connection if(!m_connected && m_crtc->isValid()) - setCrtc(None); + setCrtc(m_screen->crtc(None), true); if(changed) emit outputChanged(m_id, changed); @@ -266,10 +266,7 @@ ModeList RandROutput::modes() const RandRMode RandROutput::mode() const { - if (!isConnected()) - return None; - - if (!m_crtc) + if (!isConnected() || !m_crtc) return RandRMode(); return m_crtc->mode();