From kde-panel-devel Fri Jan 29 14:18:33 2016 From: =?utf-8?q?graesslin_=28Martin_Gr=C3=A4=C3=9Flin=29?= X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=145407712824542 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============8787532840667065343==" --===============8787532840667065343== Content-Type: multipart/alternative; boundary="bcfee1b99f2e4d6ca7d6d49042d50667" --bcfee1b99f2e4d6ca7d6d49042d50667 Content-Type: text/plain; charset="ascii" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit graesslin created this revision. graesslin added reviewers: bshah, broulik. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. REVISION SUMMARY KScreenLocker checks whether power management is inhibited on idle time out. So far this used a sync and blocking dbus call. This change makes the check async. KScreenLocker connects to the InhibitionsChanged signal provided by powerdevil and queries the current state in an async way each time the signal gets emitted. When KScreenLocker hits an idle connection it has the knowledge wheter power management is inhibited and does not need to perform the blocking call any more. It's important for KScreenLocker to not have blocking calls as it's used inside the Wayland compositor and can by that easily create dead-lock situations (e.g. PowerDevil waiting for the Wayland compositor and the compositor waiting for the reply). REPOSITORY rKSCREENLOCKER KScreenLocker BRANCH async-check-fdo-inhibition REVISION DETAIL https://phabricator.kde.org/D884 AFFECTED FILES CMakeLists.txt ksldapp.cpp ksldapp.h powermanagement_inhibition.cpp powermanagement_inhibition.h EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: graesslin, bshah, broulik Cc: plasma-devel --bcfee1b99f2e4d6ca7d6d49042d50667 Content-Type: text/html; charset="ascii" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit
graesslin created this revision.
graesslin added reviewers: bshah, broulik.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.

REVISION SUMMARY

KScreenLocker checks whether power management is inhibited on idle
time out. So far this used a sync and blocking dbus call.

This change makes the check async. KScreenLocker connects to the
InhibitionsChanged signal provided by powerdevil and queries the
current state in an async way each time the signal gets emitted.

When KScreenLocker hits an idle connection it has the knowledge wheter
power management is inhibited and does not need to perform the blocking
call any more.

It's important for KScreenLocker to not have blocking calls as it's
used inside the Wayland compositor and can by that easily create
dead-lock situations (e.g. PowerDevil waiting for the Wayland compositor
and the compositor waiting for the reply).


REPOSITORY
rKSCREENLOCKER KScreenLocker

BRANCH
async-check-fdo-inhibition

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

AFFECTED FILES
CMakeLists.txt
ksldapp.cpp
ksldapp.h
powermanagement_inhibition.cpp
powermanagement_inhibition.h

EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, bshah, broulik
Cc: plasma-devel
--bcfee1b99f2e4d6ca7d6d49042d50667-- --===============8787532840667065343== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KUGxhc21hLWRl dmVsIG1haWxpbmcgbGlzdApQbGFzbWEtZGV2ZWxAa2RlLm9yZwpodHRwczovL21haWwua2RlLm9y Zy9tYWlsbWFuL2xpc3RpbmZvL3BsYXNtYS1kZXZlbAo= --===============8787532840667065343==--