Add origin information to output.geometry event
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 2 Dec 2010 01:10:10 +0000 (20:10 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 2 Dec 2010 01:10:10 +0000 (20:10 -0500)
clients/window.c
compositor/compositor-wayland.c
compositor/compositor.c
protocol/wayland.xml

index d03ef4b..ed3a208 100644 (file)
@@ -1272,12 +1272,12 @@ static const struct wl_drm_listener drm_listener = {
 static void
 display_handle_geometry(void *data,
                        struct wl_output *output,
-                       int32_t width, int32_t height)
+                       int32_t x, int32_t y, int32_t width, int32_t height)
 {
        struct display *display = data;
 
-       display->screen_allocation.x = 0;
-       display->screen_allocation.y = 0;
+       display->screen_allocation.x = x;
+       display->screen_allocation.y = y;
        display->screen_allocation.width = width;
        display->screen_allocation.height = height;
 }
index fa630bc..0281506 100644 (file)
@@ -316,12 +316,13 @@ create_invisible_pointer(struct wayland_compositor *c)
 static void
 display_handle_geometry(void *data,
                        struct wl_output *output,
+                       int32_t x, int32_t y,
                        int32_t width, int32_t height)
 {
        struct wayland_compositor *c = data;
 
-       c->parent.screen_allocation.x = 0;
-       c->parent.screen_allocation.y = 0;
+       c->parent.screen_allocation.x = x;
+       c->parent.screen_allocation.y = y;
        c->parent.screen_allocation.width = width;
        c->parent.screen_allocation.height = height;
 }
index 564a508..d0cdcf2 100644 (file)
@@ -1199,6 +1199,7 @@ wlsc_output_post_geometry(struct wl_client *client, struct wl_object *global)
 
        wl_client_post_event(client, global,
                             WL_OUTPUT_GEOMETRY,
+                            output->x, output->y,
                             output->width, output->height);
 }
 
index 77ff8f8..ca887a9 100644 (file)
   <interface name="output" version="1">
     <!-- Notification about the screen size. -->
     <event name="geometry">
+      <arg name="x" type="int"/>
+      <arg name="y" type="int"/>
       <arg name="width" type="int"/>
       <arg name="height" type="int"/>
     </event>