Add origin information to output.geometry event

This commit is contained in:
Kristian Høgsberg 2010-12-01 20:10:10 -05:00
parent aa82767c98
commit f8fc08f771
4 changed files with 9 additions and 5 deletions

View 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;
}

View 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);
}