prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Mouse movements example does not work
  When I run the example at https://textual.textualize.io/guide/input/#mouse-movements in gnome-terminal all I can see is black screen, and nothing I do (apart from CTRL+C) seems to have any effect.
  
  ```
  textual diagnose
  ```
  
  # Textual Diagnostics
  
  ## Versions
  
  | Name    | Value  |
  |---------|--------|
  | Textual | 0.41.0 |
  | Rich    | 13.6.0 |
  
  ## Python
  
  | Name           | Value                                                                     |
  |----------------|---------------------------------------------------------------------------|
  | Version        | 3.11.2                                                                    |
  | Implementation | CPython                                                                   |
  | Compiler       | GCC 12.2.0                                                                |
  | Executable     | /srv/home/porridge/.local/share/virtualenvs/reconcile-Vnvz65ja/bin/python |
  
  ## Operating System
  
  | Name    | Value                                               |
  |---------|-----------------------------------------------------|
  | System  | Linux                                               |
  | Release | 6.1.0-13-amd64                                      |
  | Version | #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) |
  
  ## Terminal
  
  | Name                 | Value          |
  |----------------------|----------------|
  | Terminal Application | *Unknown*      |
  | TERM                 | xterm-256color |
  | COLORTERM            | truecolor      |
  | FORCE_COLOR          | *Not set*      |
  | NO_COLOR             | *Not set*      |
  
  ## Rich Console options
  
  | Name           | Value               |
  |----------------|---------------------|
  | size           | width=87, height=27 |
  | legacy_windows | False               |
  | min_width      | 1                   |
  | max_width      | 87                  |
  | is_terminal    | True                |
  | encoding       | utf-8               |
  | max_height     | 27                  |
  | justify        | None                |
  | overflow       | None                |
  | no_wrap        | False               |
  | highlight      | None                |
  | markup         | None                |
  | height         | None                |
  
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `docs/examples/guide/input/mouse01.py`
  Content:
  ```
  1 from textual import events
  2 from textual.app import App, ComposeResult
  3 from textual.containers import Container
  4 from textual.widgets import RichLog, Static
  5 
  6 
  7 class PlayArea(Container):
  8     def on_mount(self) -> None:
  9         self.capture_mouse()
  10 
  11     def on_mouse_move(self, event: events.MouseMove) -> None:
  12         self.screen.query_one(RichLog).write(event)
  13         self.query_one(Ball).offset = event.offset - (8, 2)
  14 
  15 
  16 class Ball(Static):
  17     pass
  18 
  19 
  20 class MouseApp(App):
  21     CSS_PATH = "mouse01.tcss"
  22 
  23     def compose(self) -> ComposeResult:
  24         yield RichLog()
  25         yield PlayArea(Ball("Textual"))
  26 
  27 
  28 if __name__ == "__main__":
  29     app = MouseApp()
  30     app.run()
  31
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/docs/examples/guide/input/mouse01.py b/docs/examples/guide/input/mouse01.py
  --- a/docs/examples/guide/input/mouse01.py
  +++ b/docs/examples/guide/input/mouse01.py
  @@ -1,18 +1,8 @@
   from textual import events
   from textual.app import App, ComposeResult
  -from textual.containers import Container
   from textual.widgets import RichLog, Static
   
   
  -class PlayArea(Container):
  -    def on_mount(self) -> None:
  -        self.capture_mouse()
  -
  -    def on_mouse_move(self, event: events.MouseMove) -> None:
  -        self.screen.query_one(RichLog).write(event)
  -        self.query_one(Ball).offset = event.offset - (8, 2)
  -
  -
   class Ball(Static):
       pass
   
  @@ -22,7 +12,11 @@
   
       def compose(self) -> ComposeResult:
           yield RichLog()
  -        yield PlayArea(Ball("Textual"))
  +        yield Ball("Textual")
  +
  +    def on_mouse_move(self, event: events.MouseMove) -> None:
  +        self.screen.query_one(RichLog).write(event)
  +        self.query_one(Ball).offset = event.screen_offset - (8, 2)
   
   
   if __name__ == "__main__":
  
verification_info: {"golden_diff": "diff --git a/docs/examples/guide/input/mouse01.py b/docs/examples/guide/input/mouse01.py\n--- a/docs/examples/guide/input/mouse01.py\n+++ b/docs/examples/guide/input/mouse01.py\n@@ -1,18 +1,8 @@\n from textual import events\n from textual.app import App, ComposeResult\n-from textual.containers import Container\n from textual.widgets import RichLog, Static\n \n \n-class PlayArea(Container):\n-    def on_mount(self) -> None:\n-        self.capture_mouse()\n-\n-    def on_mouse_move(self, event: events.MouseMove) -> None:\n-        self.screen.query_one(RichLog).write(event)\n-        self.query_one(Ball).offset = event.offset - (8, 2)\n-\n-\n class Ball(Static):\n     pass\n \n@@ -22,7 +12,11 @@\n \n     def compose(self) -> ComposeResult:\n         yield RichLog()\n-        yield PlayArea(Ball(\"Textual\"))\n+        yield Ball(\"Textual\")\n+\n+    def on_mouse_move(self, event: events.MouseMove) -> None:\n+        self.screen.query_one(RichLog).write(event)\n+        self.query_one(Ball).offset = event.screen_offset - (8, 2)\n \n \n if __name__ == \"__main__\":\n", "issue": "Mouse movements example does not work\nWhen I run the example at https://textual.textualize.io/guide/input/#mouse-movements in gnome-terminal all I can see is black screen, and nothing I do (apart from CTRL+C) seems to have any effect.\r\n\r\n```\r\ntextual diagnose\r\n```\r\n\r\n# Textual Diagnostics\r\n\r\n## Versions\r\n\r\n| Name    | Value  |\r\n|---------|--------|\r\n| Textual | 0.41.0 |\r\n| Rich    | 13.6.0 |\r\n\r\n## Python\r\n\r\n| Name           | Value                                                                     |\r\n|----------------|---------------------------------------------------------------------------|\r\n| Version        | 3.11.2                                                                    |\r\n| Implementation | CPython                                                                   |\r\n| Compiler       | GCC 12.2.0                                                                |\r\n| Executable     | /srv/home/porridge/.local/share/virtualenvs/reconcile-Vnvz65ja/bin/python |\r\n\r\n## Operating System\r\n\r\n| Name    | Value                                               |\r\n|---------|-----------------------------------------------------|\r\n| System  | Linux                                               |\r\n| Release | 6.1.0-13-amd64                                      |\r\n| Version | #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) |\r\n\r\n## Terminal\r\n\r\n| Name                 | Value          |\r\n|----------------------|----------------|\r\n| Terminal Application | *Unknown*      |\r\n| TERM                 | xterm-256color |\r\n| COLORTERM            | truecolor      |\r\n| FORCE_COLOR          | *Not set*      |\r\n| NO_COLOR             | *Not set*      |\r\n\r\n## Rich Console options\r\n\r\n| Name           | Value               |\r\n|----------------|---------------------|\r\n| size           | width=87, height=27 |\r\n| legacy_windows | False               |\r\n| min_width      | 1                   |\r\n| max_width      | 87                  |\r\n| is_terminal    | True                |\r\n| encoding       | utf-8               |\r\n| max_height     | 27                  |\r\n| justify        | None                |\r\n| overflow       | None                |\r\n| no_wrap        | False               |\r\n| highlight      | None                |\r\n| markup         | None                |\r\n| height         | None                |\r\n\r\n\r\n\n", "before_files": [{"content": "from textual import events\nfrom textual.app import App, ComposeResult\nfrom textual.containers import Container\nfrom textual.widgets import RichLog, Static\n\n\nclass PlayArea(Container):\n    def on_mount(self) -> None:\n        self.capture_mouse()\n\n    def on_mouse_move(self, event: events.MouseMove) -> None:\n        self.screen.query_one(RichLog).write(event)\n        self.query_one(Ball).offset = event.offset - (8, 2)\n\n\nclass Ball(Static):\n    pass\n\n\nclass MouseApp(App):\n    CSS_PATH = \"mouse01.tcss\"\n\n    def compose(self) -> ComposeResult:\n        yield RichLog()\n        yield PlayArea(Ball(\"Textual\"))\n\n\nif __name__ == \"__main__\":\n    app = MouseApp()\n    app.run()\n", "path": "docs/examples/guide/input/mouse01.py"}], "after_files": [{"content": "from textual import events\nfrom textual.app import App, ComposeResult\nfrom textual.widgets import RichLog, Static\n\n\nclass Ball(Static):\n    pass\n\n\nclass MouseApp(App):\n    CSS_PATH = \"mouse01.tcss\"\n\n    def compose(self) -> ComposeResult:\n        yield RichLog()\n        yield Ball(\"Textual\")\n\n    def on_mouse_move(self, event: events.MouseMove) -> None:\n        self.screen.query_one(RichLog).write(event)\n        self.query_one(Ball).offset = event.screen_offset - (8, 2)\n\n\nif __name__ == \"__main__\":\n    app = MouseApp()\n    app.run()\n", "path": "docs/examples/guide/input/mouse01.py"}]}