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
64
65
66
67
68
69
70
71
|
When xtermset_enable is set, pressing ctrl-c influences the window size:
pressing ctrl-c one time (or any odd number) leads to the original window
size whereas even number lead to the new window size. This is because
jack_term.enable() and .disable() are called and those call xtermset_enable
and _disable().
Introduce a variable which controls whether xtermset_* are called and don't
call them when ctrl-c is pressed - only call them when we're leaving jack.
Debian #196429
Depends on 40_enable_term.patch, and depends on the possible bogosity of
40_enable_term.patch (see the note there).
--- a/jack_term.py~ 2006-05-16 17:54:03.000000000 +0200
+++ b/jack_term.py 2006-05-16 17:54:32.000000000 +0200
@@ -173,7 +173,7 @@
if (x, y) != (None, None):
size_x, size_y = x, y
-def enable():
+def enable(all = 1):
global enabled
if not initialized:
@@ -182,11 +182,12 @@
if enabled:
return
- xtermset_enable()
+ if all:
+ xtermset_enable()
tmod.enable()
enabled = 1
-def disable():
+def disable(all = 1):
global enabled
import os
@@ -194,5 +195,6 @@
return
tmod.disable()
- xtermset_disable()
+ if all:
+ xtermset_disable()
enabled = 0
--- a/jack_display.py~ 2006-05-16 17:55:11.000000000 +0200
+++ b/jack_display.py 2006-05-16 17:55:05.000000000 +0200
@@ -78,7 +78,10 @@
# be display problems.
sigint_handler = signal.getsignal(signal.SIGINT)
signal.signal(signal.SIGINT, signal.SIG_IGN)
- jack_term.disable()
+ if sig:
+ jack_term.disable(all = 0)
+ else:
+ jack_term.disable(all = 1)
if sig:
exit_code = 2
@@ -101,7 +104,7 @@
raw_input("press ENTER to exit\n")
if sig:
- jack_term.enable()
+ jack_term.enable(all = 0)
signal.signal(signal.SIGINT, sigint_handler)
sys.exit(exit_code)
|