Avoid extra wakeup when rendering blinking cursor
This commit is contained in:
parent
5e676090fa
commit
1bd46b0636
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user