We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
On Linux, window contents are rendered behind a menubar
But only if the menubar wasn't defined in the application code. Here's a slightly modified [example code](https://toga.readthedocs.io/en/latest/tutorial/tutorial-0.html) I'm running:

```py
import toga

def build(app):
    box = toga.Box()
    button = toga.Button('Hello world', on_press=lambda _: print("hello"))
    box.add(button)
    return box

if __name__ == '__main__':
    app = toga.App('First App', 'org.pybee.sample', startup=build)
    app.main_loop()
```

Here's how it looks like to me:

![image](https://cloud.githubusercontent.com/assets/1298948/25163164/ec3de0a8-24d0-11e7-8d31-a07a4051172c.png)

Note that the button is behind the menubar (although no menubar was requested in the code). When I click on the menubar (including the Application or Help menu items), the button is being pressed instead.

I've tried this with a few GTK themes, including Arc-OSX-dark, Mint-X, Redmond and Adwaita, and in every case it behaves this way.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/gtk/toga_gtk/widgets/box.py`
Content:
```
1 from ..libs import Gtk, Gdk
2 from .base import Widget
3 
4 
5 class TogaBox(Gtk.Fixed):
6     def __init__(self, impl):
7         super().__init__()
8         self._impl = impl
9         self.interface = self._impl.interface
10 
11     def do_get_preferred_width(self):
12         # Calculate the minimum and natural width of the container.
13         # print("GET PREFERRED WIDTH", self._impl.native)
14         width = self._impl.interface.layout.width
15         min_width = self._impl.min_width
16         if min_width is None:
17             min_width = 0
18         elif min_width > width:
19             width = min_width
20 
21         # print(min_width, width)
22         return min_width, width
23 
24     def do_get_preferred_height(self):
25         # Calculate the minimum and natural height of the container.
26         # height = self._impl.layout.height
27         # print("GET PREFERRED HEIGHT", self._impl.native)
28         height = self._impl.interface.layout.height
29         min_height = self._impl.min_height
30         if min_height is None:
31             min_height = 0
32         elif min_height > height:
33             height = min_height
34         # print(min_height, height)
35         return min_height, height
36 
37     def do_size_allocate(self, allocation):
38         # print(self._impl, "Container layout", allocation.width, 'x', allocation.height, ' @ ', allocation.x, 'x', allocation.y)
39         if self._impl.viewport is not None:
40             self.set_allocation(allocation)
41             self.interface.refresh()
42 
43             # WARNING! This list of children is *not* the same
44             # as the list provided by the interface!
45             # For GTK's layout purposes, all widgets in the tree
46             # are children of the *container* - that is, the impl
47             # object of the root object in the tree of widgets.
48             for widget in self.get_children():
49                 if not widget.get_visible():
50                     # print("CHILD NOT VISIBLE", widget.interface)
51                     pass
52                 else:
53                     # print("update ", widget.interface, widget.interface.layout)
54                     widget.interface._impl.rehint()
55                     widget_allocation = Gdk.Rectangle()
56                     widget_allocation.x = widget.interface.layout.absolute_content_left
57                     widget_allocation.y = widget.interface.layout.absolute_content_top
58                     widget_allocation.width = widget.interface.layout.content_width
59                     widget_allocation.height = widget.interface.layout.content_height
60 
61                     widget.size_allocate(widget_allocation)
62 
63 
64 class Box(Widget):
65     def create(self):
66         self.min_width = None
67         self.min_height = None
68         self.native = TogaBox(self)
69
```
--- 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()

```

diff --git a/src/gtk/toga_gtk/widgets/box.py b/src/gtk/toga_gtk/widgets/box.py
--- a/src/gtk/toga_gtk/widgets/box.py
+++ b/src/gtk/toga_gtk/widgets/box.py
@@ -53,8 +53,8 @@
                     # print("update ", widget.interface, widget.interface.layout)
                     widget.interface._impl.rehint()
                     widget_allocation = Gdk.Rectangle()
-                    widget_allocation.x = widget.interface.layout.absolute_content_left
-                    widget_allocation.y = widget.interface.layout.absolute_content_top
+                    widget_allocation.x = widget.interface.layout.absolute_content_left + allocation.x
+                    widget_allocation.y = widget.interface.layout.absolute_content_top + allocation.y
                     widget_allocation.width = widget.interface.layout.content_width
                     widget_allocation.height = widget.interface.layout.content_height

{"golden_diff": "diff --git a/src/gtk/toga_gtk/widgets/box.py b/src/gtk/toga_gtk/widgets/box.py\n--- a/src/gtk/toga_gtk/widgets/box.py\n+++ b/src/gtk/toga_gtk/widgets/box.py\n@@ -53,8 +53,8 @@\n                     # print(\"update \", widget.interface, widget.interface.layout)\n                     widget.interface._impl.rehint()\n                     widget_allocation = Gdk.Rectangle()\n-                    widget_allocation.x = widget.interface.layout.absolute_content_left\n-                    widget_allocation.y = widget.interface.layout.absolute_content_top\n+                    widget_allocation.x = widget.interface.layout.absolute_content_left + allocation.x\n+                    widget_allocation.y = widget.interface.layout.absolute_content_top + allocation.y\n                     widget_allocation.width = widget.interface.layout.content_width\n                     widget_allocation.height = widget.interface.layout.content_height\n", "issue": "On Linux, window contents are rendered behind a menubar\nBut only if the menubar wasn't defined in the application code. Here's a slightly modified [example code](https://toga.readthedocs.io/en/latest/tutorial/tutorial-0.html) I'm running:\r\n\r\n```py\r\nimport toga\r\n\r\ndef build(app):\r\n    box = toga.Box()\r\n    button = toga.Button('Hello world', on_press=lambda _: print(\"hello\"))\r\n    box.add(button)\r\n    return box\r\n\r\nif __name__ == '__main__':\r\n    app = toga.App('First App', 'org.pybee.sample', startup=build)\r\n    app.main_loop()\r\n```\r\n\r\nHere's how it looks like to me:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1298948/25163164/ec3de0a8-24d0-11e7-8d31-a07a4051172c.png)\r\n\r\nNote that the button is behind the menubar (although no menubar was requested in the code). When I click on the menubar (including the Application or Help menu items), the button is being pressed instead.\r\n\r\nI've tried this with a few GTK themes, including Arc-OSX-dark, Mint-X, Redmond and Adwaita, and in every case it behaves this way.\r\n\n", "before_files": [{"content": "from ..libs import Gtk, Gdk\nfrom .base import Widget\n\n\nclass TogaBox(Gtk.Fixed):\n    def __init__(self, impl):\n        super().__init__()\n        self._impl = impl\n        self.interface = self._impl.interface\n\n    def do_get_preferred_width(self):\n        # Calculate the minimum and natural width of the container.\n        # print(\"GET PREFERRED WIDTH\", self._impl.native)\n        width = self._impl.interface.layout.width\n        min_width = self._impl.min_width\n        if min_width is None:\n            min_width = 0\n        elif min_width > width:\n            width = min_width\n\n        # print(min_width, width)\n        return min_width, width\n\n    def do_get_preferred_height(self):\n        # Calculate the minimum and natural height of the container.\n        # height = self._impl.layout.height\n        # print(\"GET PREFERRED HEIGHT\", self._impl.native)\n        height = self._impl.interface.layout.height\n        min_height = self._impl.min_height\n        if min_height is None:\n            min_height = 0\n        elif min_height > height:\n            height = min_height\n        # print(min_height, height)\n        return min_height, height\n\n    def do_size_allocate(self, allocation):\n        # print(self._impl, \"Container layout\", allocation.width, 'x', allocation.height, ' @ ', allocation.x, 'x', allocation.y)\n        if self._impl.viewport is not None:\n            self.set_allocation(allocation)\n            self.interface.refresh()\n\n            # WARNING! This list of children is *not* the same\n            # as the list provided by the interface!\n            # For GTK's layout purposes, all widgets in the tree\n            # are children of the *container* - that is, the impl\n            # object of the root object in the tree of widgets.\n            for widget in self.get_children():\n                if not widget.get_visible():\n                    # print(\"CHILD NOT VISIBLE\", widget.interface)\n                    pass\n                else:\n                    # print(\"update \", widget.interface, widget.interface.layout)\n                    widget.interface._impl.rehint()\n                    widget_allocation = Gdk.Rectangle()\n                    widget_allocation.x = widget.interface.layout.absolute_content_left\n                    widget_allocation.y = widget.interface.layout.absolute_content_top\n                    widget_allocation.width = widget.interface.layout.content_width\n                    widget_allocation.height = widget.interface.layout.content_height\n\n                    widget.size_allocate(widget_allocation)\n\n\nclass Box(Widget):\n    def create(self):\n        self.min_width = None\n        self.min_height = None\n        self.native = TogaBox(self)\n", "path": "src/gtk/toga_gtk/widgets/box.py"}], "after_files": [{"content": "from ..libs import Gtk, Gdk\nfrom .base import Widget\n\n\nclass TogaBox(Gtk.Fixed):\n    def __init__(self, impl):\n        super().__init__()\n        self._impl = impl\n        self.interface = self._impl.interface\n\n    def do_get_preferred_width(self):\n        # Calculate the minimum and natural width of the container.\n        # print(\"GET PREFERRED WIDTH\", self._impl.native)\n        width = self._impl.interface.layout.width\n        min_width = self._impl.min_width\n        if min_width is None:\n            min_width = 0\n        elif min_width > width:\n            width = min_width\n\n        # print(min_width, width)\n        return min_width, width\n\n    def do_get_preferred_height(self):\n        # Calculate the minimum and natural height of the container.\n        # height = self._impl.layout.height\n        # print(\"GET PREFERRED HEIGHT\", self._impl.native)\n        height = self._impl.interface.layout.height\n        min_height = self._impl.min_height\n        if min_height is None:\n            min_height = 0\n        elif min_height > height:\n            height = min_height\n        # print(min_height, height)\n        return min_height, height\n\n    def do_size_allocate(self, allocation):\n        # print(self._impl, \"Container layout\", allocation.width, 'x', allocation.height, ' @ ', allocation.x, 'x', allocation.y)\n        if self._impl.viewport is not None:\n            self.set_allocation(allocation)\n            self.interface.refresh()\n\n            # WARNING! This list of children is *not* the same\n            # as the list provided by the interface!\n            # For GTK's layout purposes, all widgets in the tree\n            # are children of the *container* - that is, the impl\n            # object of the root object in the tree of widgets.\n            for widget in self.get_children():\n                if not widget.get_visible():\n                    # print(\"CHILD NOT VISIBLE\", widget.interface)\n                    pass\n                else:\n                    # print(\"update \", widget.interface, widget.interface.layout)\n                    widget.interface._impl.rehint()\n                    widget_allocation = Gdk.Rectangle()\n                    widget_allocation.x = widget.interface.layout.absolute_content_left + allocation.x\n                    widget_allocation.y = widget.interface.layout.absolute_content_top + allocation.y\n                    widget_allocation.width = widget.interface.layout.content_width\n                    widget_allocation.height = widget.interface.layout.content_height\n\n                    widget.size_allocate(widget_allocation)\n\n\nclass Box(Widget):\n    def create(self):\n        self.min_width = None\n        self.min_height = None\n        self.native = TogaBox(self)\n", "path": "src/gtk/toga_gtk/widgets/box.py"}]}