From 1bd46b0636590f53c4fd7a3f2f55157f3ebf6ec2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 7 Sep 2017 20:18:29 +0530 Subject: [PATCH] Avoid extra wakeup when rendering blinking cursor --- kitty/boss.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kitty/boss.py b/kitty/boss.py index 53fcffc27..ffc8dcfff 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -50,9 +50,8 @@ class Timers(_Timers): return _Timers.remove_event(self, timer) -def conditional_run(w, i): - if w is None or not w.destroyed: - next(i, None) +def wakeup_for_cursor_blink_render(): + pass class DumpCommands: # {{{ @@ -400,7 +399,7 @@ class Boss: n = t // d draw_cursor = n % 2 == 0 self.ui_timers.add_if_missing( - ((n + 1) * d / 1000) - now, glfw_post_empty_event) + ((n + 1) * d / 1000) - now, wakeup_for_cursor_blink_render) if draw_cursor: with self.cursor_program: active.char_grid.render_cursor(