GNOME Bugzilla – Bug 794563
Use Mutter's new D-Bus interface to reset idletime
Last modified: 2018-05-04 14:21:31 UTC
.
Created attachment 369959 [details] [review] power: Remove X11-specific idle time reset code It's now implemented in mutter itself. See https://bugzilla.gnome.org/show_bug.cgi?id=705942
Created attachment 369960 [details] [review] tests: Use Mutter's new D-Bus interface to reset idletime Rather than poke through using XTest, use Mutter's new D-Bus API to do as if the user pressed a key on a keyboard. See https://bugzilla.gnome.org/show_bug.cgi?id=705942
Created attachment 369964 [details] [review] power: Add test for idletime inhibitors See https://bugzilla.gnome.org/show_bug.cgi?id=705942
Review of attachment 369959 [details] [review]: lgtm once the mutter changed is merged
Review of attachment 369960 [details] [review]: lgtm
Review of attachment 369964 [details] [review]: Hm, the check_no_suspend seems an unrelated optimisation to fail faster. Fine with keeping it in here. One slightly oddity is that it won't even read the log with a timeout of 0 now though.
(In reply to Benjamin Berg from comment #6) > Review of attachment 369964 [details] [review] [review]: > > Hm, the check_no_suspend seems an unrelated optimisation to fail faster. > Fine with keeping it in here. > > One slightly oddity is that it won't even read the log with a timeout of 0 > now though. Definitely need to fix that.
Created attachment 370000 [details] [review] power: Add test for idletime inhibitors See https://bugzilla.gnome.org/show_bug.cgi?id=705942
Review of attachment 370000 [details] [review]: ok, that looks good
Created attachment 371643 [details] [review] power: Fix possible exception trying to read logind stdout ERROR: test_inhibitor_idletime (__main__.PowerPluginTest) ---------------------------------------------------------------------- Traceback (most recent call last):
+ Trace 238597
self.check_no_suspend(2)
log = self.logind.stdout.read()
Review of attachment 371643 [details] [review]: Ah, yes, non-blocking IO.
Attachment 369959 [details] pushed as 06eb39d - power: Remove X11-specific idle time reset code Attachment 369960 [details] pushed as 5bc16fd - tests: Use Mutter's new D-Bus interface to reset idletime Attachment 370000 [details] pushed as 3e9b7f8 - power: Add test for idletime inhibitors Attachment 371643 [details] pushed as 5edef27 - power: Fix possible exception trying to read logind stdout