Fix infinite recursion in xscreensaver plugin
ClosedPublic

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

Details

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.Feb 13 2020, 9:35 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 13 2020, 9:35 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
alnikiforov requested review of this revision.Feb 13 2020, 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

broulik accepted this revision.Feb 17 2020, 4:20 PM
This revision is now accepted and ready to land.Feb 17 2020, 4:20 PM

Could you please merge this change? Or is something stopping from merging it?

Sorry, I just returned from vacation. I'll merge this on Monday (since Frameworks tagging is tomorrow) so we'll get another month worth of testing.

This revision was automatically updated to reflect the committed changes.