Changeset View
Changeset View
Standalone View
Standalone View
daemon/actions/bundled/handlebuttonevents.cpp
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Line(s) | 240 | if (output->isConnected() && output->isEnabled() && output->type() != KScreen::Output::Panel && output->type() != KScreen::Output::Unknown) { | |||
---|---|---|---|---|---|
242 | break; | 242 | break; | ||
243 | } | 243 | } | ||
244 | } | 244 | } | ||
245 | 245 | | |||
246 | m_externalMonitorPresent = hasExternalMonitor; | 246 | m_externalMonitorPresent = hasExternalMonitor; | ||
247 | 247 | | |||
248 | if (old_triggersLidAction != triggersLidAction()) { | 248 | if (old_triggersLidAction != triggersLidAction()) { | ||
249 | Q_EMIT triggersLidActionChanged(triggersLidAction()); | 249 | Q_EMIT triggersLidActionChanged(triggersLidAction()); | ||
250 | | ||||
251 | // when the lid is closed but we don't suspend because of an external monitor but we then | ||||
252 | // unplug said monitor, re-trigger the lid action (Bug 379265) | ||||
oliverhenshaw: nit: Missing the bug number here | |||||
253 | if (triggersLidAction() && backend()->isLidClosed()) { | ||||
254 | qCDebug(POWERDEVIL) << "External monitor that kept us from suspending is gone and lid is closed, re-triggering lid action"; | ||||
255 | onButtonPressed(BackendInterface::LidClose); | ||||
256 | } | ||||
250 | } | 257 | } | ||
251 | } | 258 | } | ||
252 | 259 | | |||
253 | } | 260 | } | ||
254 | } | 261 | } |
nit: Missing the bug number here