summarylogtreecommitdiffstats
path: root/no-appnope.patch
blob: 882a4b6b6fb708eb10e89e811b77dcdf7dbb5c7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff --git a/corrscope/corrscope.py b/corrscope/corrscope.py
index d7ced20..a4c63a4 100644
--- a/corrscope/corrscope.py
+++ b/corrscope/corrscope.py
@@ -195,11 +195,6 @@ class Arguments:
 
 
 def worker_create_renderer(renderer_params: RendererParams, shmem_names: List[str]):
-    import appnope
-
-    # Disable power saving for renderer processes.
-    appnope.nope()
-
     global WORKER_RENDERER
     global SHMEMS
 
diff --git a/corrscope/gui/__init__.py b/corrscope/gui/__init__.py
index bc9b91a..ac22cab 100644
--- a/corrscope/gui/__init__.py
+++ b/corrscope/gui/__init__.py
@@ -9,7 +9,6 @@ from pathlib import Path
 from types import MethodType
 from typing import Optional, List, Any, Tuple, Callable, Union, Dict, Sequence, NewType
 
-import appnope
 import qtpy.QtCore as qc
 import qtpy.QtWidgets as qw
 import attr
@@ -751,22 +750,21 @@ class CorrJob(qc.QObject):
         """Called in separate thread."""
         cfg = self.cfg
         arg = self.arg
-        with appnope.nope_scope(reason="corrscope preview/render active"):
-            try:
-                self.corr = CorrScope(cfg, arg)
-                self.corr.play()
+        try:
+            self.corr = CorrScope(cfg, arg)
+            self.corr.play()
 
-            except paths.MissingFFmpegError:
-                arg.on_end()
-                self.ffmpeg_missing.emit()
+        except paths.MissingFFmpegError:
+            arg.on_end()
+            self.ffmpeg_missing.emit()
 
-            except Exception as e:
-                arg.on_end()
-                stack_trace = format_stack_trace(e)
-                self.error.emit(stack_trace)
+        except Exception as e:
+            arg.on_end()
+            stack_trace = format_stack_trace(e)
+            self.error.emit(stack_trace)
 
-            else:
-                arg.on_end()
+        else:
+            arg.on_end()
 
 
 class CorrThread(Thread):