Skip to content

Commit 8fca87e

Browse files
committed
docstring
1 parent 6d4ee4b commit 8fca87e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/textual/app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2921,8 +2921,11 @@ async def check_mouse() -> None:
29212921
def capture_mouse(self, widget: Widget | None) -> None:
29222922
"""Send all mouse events to the given widget or disable mouse capture.
29232923
2924+
Normally mouse events are sent to the widget directly under the pointer.
2925+
Capturing the mouse allows a widget to receive mouse events even when the pointer is over another widget.
2926+
29242927
Args:
2925-
widget: If a widget, capture mouse event, or `None` to end mouse capture.
2928+
widget: Widget to capture mouse events, or `None` to end mouse capture.
29262929
"""
29272930
if widget == self.mouse_captured:
29282931
return

0 commit comments

Comments
 (0)