mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 21:45:03 +02:00
Prevent an infinite recursion if a watcher causes a resize in the on_resize handler
This commit is contained in:
@@ -109,7 +109,7 @@ def run_worker() -> None:
|
||||
print(get_released_version())
|
||||
|
||||
|
||||
def update_check(timer_id: Optional[int] = None) -> bool:
|
||||
def update_check() -> bool:
|
||||
try:
|
||||
p = subprocess.Popen([
|
||||
kitty_exe(), '+runpy',
|
||||
@@ -123,6 +123,10 @@ def update_check(timer_id: Optional[int] = None) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
def update_check_callback(timer_id: Optional[int]) -> None:
|
||||
update_check()
|
||||
|
||||
|
||||
def run_update_check(interval: float = CHECK_INTERVAL) -> None:
|
||||
if update_check():
|
||||
add_timer(update_check, interval)
|
||||
add_timer(update_check_callback, interval)
|
||||
|
||||
Reference in New Issue
Block a user