From 53d8ca5d3e079f800a4ee9ec45ee856f3007187b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 22 Apr 2025 09:06:13 +0530 Subject: [PATCH] Add a note for why debounce is needed --- kittens/panel/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kittens/panel/main.py b/kittens/panel/main.py index 6e6fb02e2..c971ff3aa 100644 --- a/kittens/panel/main.py +++ b/kittens/panel/main.py @@ -318,6 +318,8 @@ def do_visibility_toggle(timer_id: int | None = None) -> None: def schedule_visibility_toggle(debounce_interval: float = 0.2) -> None: + # Debouncing of toggle requests is needed because of buggy Wayland + # compositors: https://github.com/kovidgoyal/kitty/issues/8557 global num_of_pending_toggles, last_toggled_at num_of_pending_toggles += 1 if (delta := monotonic() - last_toggled_at) >= debounce_interval: