aboutsummaryrefslogtreecommitdiffstats
path: root/examples/x-window-focus
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-16 18:43:26 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-16 18:48:31 +0200
commit7680d6d24de9b049dfe8f322bf97fec820734fb9 (patch)
tree9c3841509480af9374e93920903438e93b1d9068 /examples/x-window-focus
parentdo not toggle when dying (diff)
downloadnightshift-7680d6d24de9b049dfe8f322bf97fec820734fb9.tar.gz
nightshift-7680d6d24de9b049dfe8f322bf97fec820734fb9.tar.bz2
nightshift-7680d6d24de9b049dfe8f322bf97fec820734fb9.tar.xz
m misc + add freeze/thaw
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples/x-window-focus')
-rw-r--r--examples/x-window-focus5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/x-window-focus b/examples/x-window-focus
index e08442e..9d341ff 100644
--- a/examples/x-window-focus
+++ b/examples/x-window-focus
@@ -29,6 +29,9 @@ import threading
import Xlib.display
+# TODO: cannot re-exec when this script is used
+# TODO: does not wait with toggling of redshift is froozen
+
def x_window_focus_thread_function(proc):
'''
@@ -95,7 +98,7 @@ def x_window_focus_thread_function(proc):
should_be_disabled = True
# Perhaps toggle
- if red_running and (should_be_disabled == red_status) and not red_dying:
+ if red_running and (should_be_disabled == red_status) and (not red_dying) and (not red_froozen):
if red_status or we_disabled:
we_disabled = should_be_disabled
proc.send_signal(signal.SIGUSR1)