diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-12-01 20:10:10 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-12-01 20:10:10 -0500 |
commit | f8fc08f77187f6a5723281dab66841e5f3c24320 (patch) | |
tree | 2c6f15382c454635926d309c3d91bac59540ba58 | |
parent | aa82767c9838f2c834d7976ae6377491894ca6fe (diff) | |
download | weston-f8fc08f77187f6a5723281dab66841e5f3c24320.tar.gz |
Add origin information to output.geometry event
-rw-r--r-- | clients/window.c | 6 | ||||
-rw-r--r-- | compositor/compositor-wayland.c | 5 | ||||
-rw-r--r-- | compositor/compositor.c | 1 | ||||
-rw-r--r-- | protocol/wayland.xml | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/clients/window.c b/clients/window.c index d03ef4b0..ed3a208f 100644 --- a/clients/window.c +++ b/clients/window.c @@ -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; } diff --git a/compositor/compositor-wayland.c b/compositor/compositor-wayland.c index fa630bc0..0281506a 100644 --- a/compositor/compositor-wayland.c +++ b/compositor/compositor-wayland.c @@ -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; } diff --git a/compositor/compositor.c b/compositor/compositor.c index 564a5085..d0cdcf24 100644 --- a/compositor/compositor.c +++ b/compositor/compositor.c @@ -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); } diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 77ff8f80..ca887a90 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -378,6 +378,8 @@ <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> |