[mutter] wayland: Use the send event wrappers
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Use the send event wrappers
- Date: Tue, 5 Aug 2014 20:12:42 +0000 (UTC)
commit e5c4fedd551da559927282432980b1bf5e1728df
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 5 16:11:48 2014 -0400
wayland: Use the send event wrappers
Rather than raw post_event.
src/wayland/meta-wayland-outputs.c | 41 +++++++++++++++--------------------
1 files changed, 18 insertions(+), 23 deletions(-)
---
diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c
index f2caf31..90990e6 100644
--- a/src/wayland/meta-wayland-outputs.c
+++ b/src/wayland/meta-wayland-outputs.c
@@ -114,18 +114,17 @@ bind_output (struct wl_client *client,
output->crtc->rect.width, output->crtc->rect.height,
output->crtc->current_mode->refresh_rate);
- wl_resource_post_event (resource,
- WL_OUTPUT_GEOMETRY,
- (int)output->crtc->rect.x,
- (int)output->crtc->rect.y,
- output->width_mm,
- output->height_mm,
- /* Cogl values reflect XRandR values,
- and so does wayland */
- output->subpixel_order,
- output->vendor,
- output->product,
- output->crtc->transform);
+ wl_output_send_geometry (resource,
+ (int)output->crtc->rect.x,
+ (int)output->crtc->rect.y,
+ output->width_mm,
+ output->height_mm,
+ /* Cogl values reflect XRandR values,
+ and so does wayland */
+ output->subpixel_order,
+ output->vendor,
+ output->product,
+ output->crtc->transform);
g_assert (output->crtc->current_mode != NULL);
@@ -133,22 +132,18 @@ bind_output (struct wl_client *client,
if (output->crtc->current_mode == output->preferred_mode)
mode_flags |= WL_OUTPUT_MODE_PREFERRED;
- wl_resource_post_event (resource,
- WL_OUTPUT_MODE,
- mode_flags,
- (int)output->crtc->current_mode->width,
- (int)output->crtc->current_mode->height,
- (int)output->crtc->current_mode->refresh_rate);
+ wl_output_send_mode (resource,
+ mode_flags,
+ (int)output->crtc->current_mode->width,
+ (int)output->crtc->current_mode->height,
+ (int)output->crtc->current_mode->refresh_rate);
output->scale = compute_scale (output);
if (version >= WL_OUTPUT_SCALE_SINCE_VERSION)
- wl_resource_post_event (resource,
- WL_OUTPUT_SCALE,
- output->scale);
+ wl_output_send_scale (resource, output->scale);
if (version >= WL_OUTPUT_DONE_SINCE_VERSION)
- wl_resource_post_event (resource,
- WL_OUTPUT_DONE);
+ wl_output_send_done (resource);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]