INNER CODE UNIT · Python
on_bull_click
alex-jb/orallexa-ai-trading-agent · desktop_agent/main.py:80
def on_bull_click(x: int, y: int) -> None:
nonlocal popover
if popover is None:
return
if popover.is_visible():
popover.hide()
else:
popover.show(anchor_x=x, anchor_y=y)
bull = BullCharacter(on_click=on_bull_click)
_pending_timers: list[str] = []
def _cancel_all_timers() -> None:
"""Cancel all pending after() timers to prevent stale callbacks."""
for timer_id in _pending_timers:
try:
bull._win.after_cancel(timer_id)