MCPcopy
hub / github.com/Textualize/textual / _on_timer_update

Method _on_timer_update

src/textual/screen.py:1236–1262  ·  view source on GitHub ↗

Called by the _update_timer.

(self)

Source from the content-addressed store, hash-verified

1234 app._update_mouse_over(self)
1235
1236 def _on_timer_update(self) -> None:
1237 """Called by the _update_timer."""
1238 self._update_timer.pause()
1239 if self.is_current and not self.app._batch_count:
1240 if self._layout_required:
1241 self._refresh_layout(scroll=self._scroll_required)
1242 self._layout_required = False
1243 self._dirty_widgets.clear()
1244 elif self._scroll_required:
1245 self._refresh_layout(scroll=True)
1246 self._scroll_required = False
1247
1248 if self._repaint_required:
1249 self._dirty_widgets.clear()
1250 self._dirty_widgets.add(self)
1251 self._repaint_required = False
1252
1253 if self._dirty_widgets:
1254 self._compositor.update_widgets(self._dirty_widgets)
1255 self._compositor_refresh()
1256
1257 if self._recompose_required:
1258 self._recompose_required = False
1259 self.call_next(self.recompose)
1260
1261 if self._callbacks:
1262 self.call_next(self._invoke_and_clear_callbacks)
1263
1264 async def _invoke_and_clear_callbacks(self) -> None:
1265 """If there are scheduled callbacks to run, call them and clear

Callers 3

pauseMethod · 0.80
wait_for_animationMethod · 0.80

Calls 7

_refresh_layoutMethod · 0.95
_compositor_refreshMethod · 0.95
update_widgetsMethod · 0.80
pauseMethod · 0.45
clearMethod · 0.45
addMethod · 0.45
call_nextMethod · 0.45

Tested by

no test coverage detected