Fix infinite recursion in xscreensaver plugin
Needs ReviewPublic

Authored by alnikiforov on Thu, Feb 13, 9:35 AM.

Details

Reviewers
davidedmundson
broulik
Group Reviewers
Frameworks
Summary

Follow up for D27279

Related to: D17874

Test Plan

Test plan similar to D27279, but powerdevil should no longer crash

Diff Detail

Repository
R274 KIdleTime
Lint
Lint Skipped
Unit
Unit Tests Skipped
alnikiforov created this revision.Thu, Feb 13, 9:35 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptThu, Feb 13, 9:35 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
alnikiforov requested review of this revision.Thu, Feb 13, 9:35 AM

Neither the XSync nor the windows backend explicitly call resumingFromIdle in simulateUserActivity, so I think this should be fine.
However, I don't know if that won't indirectly trigger it if the session was idle? Maybe we need to check if the session was idle and only then emit the signal.

Neither the XSync nor the windows backend explicitly call resumingFromIdle in simulateUserActivity, so I think this should be fine.
However, I don't know if that won't indirectly trigger it if the session was idle? Maybe we need to check if the session was idle and only then emit the signal.

I'm not sure how exactly it works, but if session was idle, wouldn't function screensaverActivated be called on changing state? And it contains emit resumingFromIdle():

https://phabricator.kde.org/source/kidletime/browse/master/src/plugins/xscreensaver/xscreensaverbasedpoller.cpp$37