Changeset View
Changeset View
Standalone View
Standalone View
backends/xrandr/xrandrcrtc.cpp
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | |||||
61 | 61 | | |||
62 | QVector<xcb_randr_output_t> XRandRCrtc::outputs() const | 62 | QVector<xcb_randr_output_t> XRandRCrtc::outputs() const | ||
63 | { | 63 | { | ||
64 | return m_outputs; | 64 | return m_outputs; | ||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | bool XRandRCrtc::connectOutput(xcb_randr_output_t output) | 67 | bool XRandRCrtc::connectOutput(xcb_randr_output_t output) | ||
68 | { | 68 | { | ||
69 | update(); | ||||
69 | qCDebug(KSCREEN_XRANDR) << "Connected output" << output << "to CRTC" << m_crtc; | 70 | qCDebug(KSCREEN_XRANDR) << "Connected output" << output << "to CRTC" << m_crtc; | ||
70 | if (!m_possibleOutputs.contains(output)) { | 71 | if (!m_possibleOutputs.contains(output)) { | ||
71 | qCDebug(KSCREEN_XRANDR) << "Output" << output << "is not an allowed output for CRTC" << m_crtc; | 72 | qCDebug(KSCREEN_XRANDR) << "Output" << output << "is not an allowed output for CRTC" << m_crtc; | ||
72 | return false; | 73 | return false; | ||
73 | } | 74 | } | ||
74 | 75 | | |||
75 | if (!m_outputs.contains(output)) { | 76 | if (!m_outputs.contains(output)) { | ||
76 | m_outputs.append(output); | 77 | m_outputs.append(output); | ||
77 | } | 78 | } | ||
78 | return true; | 79 | return true; | ||
79 | } | 80 | } | ||
80 | 81 | | |||
81 | void XRandRCrtc::disconectOutput(xcb_randr_output_t output) | 82 | void XRandRCrtc::disconectOutput(xcb_randr_output_t output) | ||
82 | { | 83 | { | ||
84 | update(); | ||||
83 | qCDebug(KSCREEN_XRANDR) << "Disconnected output" << output << "from CRTC" << m_crtc; | 85 | qCDebug(KSCREEN_XRANDR) << "Disconnected output" << output << "from CRTC" << m_crtc; | ||
84 | const int index = m_outputs.indexOf(output); | 86 | const int index = m_outputs.indexOf(output); | ||
85 | if (index > -1) { | 87 | if (index > -1) { | ||
86 | m_outputs.remove(index); | 88 | m_outputs.remove(index); | ||
87 | } | 89 | } | ||
88 | } | 90 | } | ||
89 | 91 | | |||
90 | bool XRandRCrtc::isFree() const | 92 | bool XRandRCrtc::isFree() const | ||
Show All 29 Lines |