diff --git a/bumblebee/modules/caffeine.py b/bumblebee/modules/caffeine.py index 86de530..a90a7d7 100644 --- a/bumblebee/modules/caffeine.py +++ b/bumblebee/modules/caffeine.py @@ -67,13 +67,17 @@ class Module(bumblebee.engine.Module): return True def _resume_screensaver(self): + pids = [] + success = True for process in psutil.process_iter(): if process.cmdline() == [bumblebee.util.which('xprop'), '-id', str(self._xid), '-spy']: - try: - os.kill(process.pid, 9) - except OSError: - return False - return True + pids.append(process.pid) + for pid in pids: + try: + os.kill(process.pid, 9) + except OSError: + success = False + return success def state(self, _): if self._active: