mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 09:48:09 +02:00
Avoid extra wakeup when rendering blinking cursor
This commit is contained in:
@@ -50,9 +50,8 @@ class Timers(_Timers):
|
|||||||
return _Timers.remove_event(self, timer)
|
return _Timers.remove_event(self, timer)
|
||||||
|
|
||||||
|
|
||||||
def conditional_run(w, i):
|
def wakeup_for_cursor_blink_render():
|
||||||
if w is None or not w.destroyed:
|
pass
|
||||||
next(i, None)
|
|
||||||
|
|
||||||
|
|
||||||
class DumpCommands: # {{{
|
class DumpCommands: # {{{
|
||||||
@@ -400,7 +399,7 @@ class Boss:
|
|||||||
n = t // d
|
n = t // d
|
||||||
draw_cursor = n % 2 == 0
|
draw_cursor = n % 2 == 0
|
||||||
self.ui_timers.add_if_missing(
|
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:
|
if draw_cursor:
|
||||||
with self.cursor_program:
|
with self.cursor_program:
|
||||||
active.char_grid.render_cursor(
|
active.char_grid.render_cursor(
|
||||||
|
|||||||
Reference in New Issue
Block a user