diff --git a/boot/scene.c b/boot/scene.c
index 2ac9bfc..8033d77 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -201,8 +201,8 @@
 	obj = scene_obj_find(scn, id, SCENEOBJT_NONE);
 	if (!obj)
 		return log_msg_ret("find", -ENOENT);
-	obj->x = x;
-	obj->y = y;
+	obj->dim.x = x;
+	obj->dim.y = y;
 
 	return 0;
 }
@@ -272,8 +272,8 @@
 	struct udevice *cons = text_mode ? NULL : exp->cons;
 	int x, y, ret;
 
-	x = obj->x;
-	y = obj->y;
+	x = obj->dim.x;
+	y = obj->dim.y;
 
 	switch (obj->type) {
 	case SCENEOBJT_NONE:
diff --git a/boot/scene_menu.c b/boot/scene_menu.c
index 8b04d44..eed7565 100644
--- a/boot/scene_menu.c
+++ b/boot/scene_menu.c
@@ -49,9 +49,9 @@
 	int y, cur_y;
 	int ret;
 
-	y = menu->obj.y;
+	y = menu->obj.dim.y;
 	if (menu->title_id) {
-		ret = scene_obj_set_pos(scn, menu->title_id, menu->obj.x, y);
+		ret = scene_obj_set_pos(scn, menu->title_id, menu->obj.dim.x, y);
 		if (ret < 0)
 			return log_msg_ret("tit", ret);
 
@@ -89,18 +89,18 @@
 		 * pointer, then the key and the description
 		 */
 		if (item->label_id) {
-			ret = scene_obj_set_pos(scn, item->label_id, menu->obj.x,
+			ret = scene_obj_set_pos(scn, item->label_id, menu->obj.dim.x,
 						y);
 			if (ret < 0)
 				return log_msg_ret("nam", ret);
 		}
 
-		ret = scene_obj_set_pos(scn, item->key_id, menu->obj.x + 230,
+		ret = scene_obj_set_pos(scn, item->key_id, menu->obj.dim.x + 230,
 					y);
 		if (ret < 0)
 			return log_msg_ret("key", ret);
 
-		ret = scene_obj_set_pos(scn, item->desc_id, menu->obj.x + 280,
+		ret = scene_obj_set_pos(scn, item->desc_id, menu->obj.dim.x + 280,
 					y);
 		if (ret < 0)
 			return log_msg_ret("des", ret);
@@ -134,7 +134,7 @@
 		 * points to
 		 */
 		ret = scene_obj_set_pos(scn, menu->pointer_id,
-					menu->obj.x + 200, cur_y);
+					menu->obj.dim.x + 200, cur_y);
 		if (ret < 0)
 			return log_msg_ret("ptr", ret);
 	}
diff --git a/include/expo.h b/include/expo.h
index b8f5327..5135954 100644
--- a/include/expo.h
+++ b/include/expo.h
@@ -123,14 +123,28 @@
 };
 
 /**
+ * struct scene_dim - Dimensions of an object
+ *
+ * @x: x position, in pixels from left side
+ * @y: y position, in pixels from top
+ * @w: width, in pixels
+ * @h: height, in pixels
+ */
+struct scene_dim {
+	int x;
+	int y;
+	int w;
+	int h;
+};
+
+/**
  * struct scene_obj - information about an object in a scene
  *
  * @scene: Scene that this object relates to
  * @name: Name of the object (allocated)
  * @id: ID number of the object
  * @type: Type of this object
- * @x: x position, in pixels from left side
- * @y: y position, in pixels from top
+ * @dim: Dimensions for this object
  * @hide: true if the object should be hidden
  * @sibling: Node to link this object to its siblings
  */
@@ -139,8 +153,7 @@
 	char *name;
 	uint id;
 	enum scene_obj_t type;
-	int x;
-	int y;
+	struct scene_dim dim;
 	bool hide;
 	struct list_head sibling;
 };
diff --git a/test/boot/expo.c b/test/boot/expo.c
index 70750d3..10cb7b2 100644
--- a/test/boot/expo.c
+++ b/test/boot/expo.c
@@ -250,8 +250,8 @@
 	ut_assert(id > 0);
 
 	ut_assertok(scene_obj_set_pos(scn, OBJ_LOGO, 123, 456));
-	ut_asserteq(123, img->obj.x);
-	ut_asserteq(456, img->obj.y);
+	ut_asserteq(123, img->obj.dim.x);
+	ut_asserteq(456, img->obj.dim.y);
 
 	ut_asserteq(-ENOENT, scene_obj_set_pos(scn, OBJ_TEXT2, 0, 0));
 
@@ -307,8 +307,8 @@
 	ut_asserteq(0, menu->pointer_id);
 
 	ut_assertok(scene_obj_set_pos(scn, OBJ_MENU, 50, 400));
-	ut_asserteq(50, menu->obj.x);
-	ut_asserteq(400, menu->obj.y);
+	ut_asserteq(50, menu->obj.dim.x);
+	ut_asserteq(400, menu->obj.dim.y);
 
 	id = scene_txt_str(scn, "title", OBJ_MENU_TITLE, STR_MENU_TITLE,
 			   "Main Menu", &tit);
@@ -354,24 +354,24 @@
 	ut_asserteq(id, menu->cur_item_id);
 
 	/* the title should be at the top */
-	ut_asserteq(menu->obj.x, tit->obj.x);
-	ut_asserteq(menu->obj.y, tit->obj.y);
+	ut_asserteq(menu->obj.dim.x, tit->obj.dim.x);
+	ut_asserteq(menu->obj.dim.y, tit->obj.dim.y);
 
 	/* the first item should be next */
-	ut_asserteq(menu->obj.x, name1->obj.x);
-	ut_asserteq(menu->obj.y + 32, name1->obj.y);
+	ut_asserteq(menu->obj.dim.x, name1->obj.dim.x);
+	ut_asserteq(menu->obj.dim.y + 32, name1->obj.dim.y);
 
-	ut_asserteq(menu->obj.x + 230, key1->obj.x);
-	ut_asserteq(menu->obj.y + 32, key1->obj.y);
+	ut_asserteq(menu->obj.dim.x + 230, key1->obj.dim.x);
+	ut_asserteq(menu->obj.dim.y + 32, key1->obj.dim.y);
 
-	ut_asserteq(menu->obj.x + 200, ptr->obj.x);
-	ut_asserteq(menu->obj.y + 32, ptr->obj.y);
+	ut_asserteq(menu->obj.dim.x + 200, ptr->obj.dim.x);
+	ut_asserteq(menu->obj.dim.y + 32, ptr->obj.dim.y);
 
-	ut_asserteq(menu->obj.x + 280, desc1->obj.x);
-	ut_asserteq(menu->obj.y + 32, desc1->obj.y);
+	ut_asserteq(menu->obj.dim.x + 280, desc1->obj.dim.x);
+	ut_asserteq(menu->obj.dim.y + 32, desc1->obj.dim.y);
 
-	ut_asserteq(-4, prev1->obj.x);
-	ut_asserteq(menu->obj.y + 32, prev1->obj.y);
+	ut_asserteq(-4, prev1->obj.dim.x);
+	ut_asserteq(menu->obj.dim.y + 32, prev1->obj.dim.y);
 	ut_asserteq(false, prev1->obj.hide);
 
 	expo_destroy(exp);
